[3/6] t3433: only compare commit dates
diff mbox series

Message ID 20200407141125.30872-4-phillip.wood123@gmail.com
State New
Headers show
Series
  • fixup ra/rebase-i-more-options
Related show

Commit Message

Phillip Wood April 7, 2020, 2:11 p.m. UTC
From: Phillip Wood <phillip.wood@dunelm.org.uk>

`git show` shows the diff by default so these tests which are about
checking dates were also comparing the diffs. Fix that by switching to
`git log -1`

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
---
 t/t3433-rebase-options-compatibility.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Patch
diff mbox series

diff --git a/t/t3433-rebase-options-compatibility.sh b/t/t3433-rebase-options-compatibility.sh
index 2b4d75f1ef..132f577fc9 100755
--- a/t/t3433-rebase-options-compatibility.sh
+++ b/t/t3433-rebase-options-compatibility.sh
@@ -73,16 +73,16 @@  test_expect_success '--ignore-whitespace works with interactive backend' '
 test_expect_success '--committer-date-is-author-date works with am backend' '
 	git commit --amend &&
 	git rebase --committer-date-is-author-date HEAD^ &&
-	git show HEAD --pretty="format:%ai" >authortime &&
-	git show HEAD --pretty="format:%ci" >committertime &&
+	git log -1 --pretty="format:%ai" >authortime &&
+	git log -1 --pretty="format:%ci" >committertime &&
 	test_cmp authortime committertime
 '
 
 test_expect_success '--committer-date-is-author-date works with interactive backend' '
 	git commit --amend &&
 	git rebase -i --committer-date-is-author-date HEAD^ &&
-	git show HEAD --pretty="format:%ai" >authortime &&
-	git show HEAD --pretty="format:%ci" >committertime &&
+	git log -1 --pretty="format:%ai" >authortime &&
+	git log -1 --pretty="format:%ci" >committertime &&
 	test_cmp authortime committertime
 '
 
@@ -101,14 +101,14 @@  test_expect_success '--committer-date-is-author-date works with rebase -r' '
 test_expect_success '--ignore-date works with am backend' '
 	git commit --amend --date="$GIT_AUTHOR_DATE" &&
 	git rebase --ignore-date HEAD^ &&
-	git show HEAD --pretty="format:%ai" >authortime &&
+	git log -1 --pretty="format:%ai" >authortime &&
 	grep "+0000" authortime
 '
 
 test_expect_success '--ignore-date works with interactive backend' '
 	git commit --amend --date="$GIT_AUTHOR_DATE" &&
 	git rebase --ignore-date -i HEAD^ &&
-	git show HEAD --pretty="format:%ai" >authortime &&
+	git log -1 --pretty="format:%ai" >authortime &&
 	grep "+0000" authortime
 '