]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/t3437: check the author date of fixed up commit
authorCharvi Mendiratta <charvi077@gmail.com>
Wed, 10 Feb 2021 11:36:47 +0000 (17:06 +0530)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Feb 2021 21:58:19 +0000 (13:58 -0800)
Add '%at' format in the get_author() function and update the test to
check that the author date of the fixed up commit is unchanged.

Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3437-rebase-fixup-options.sh

index d368ab4d4b21bbbdeccf679d7fa74e54957bc4b8..505211a589f24be0f947f9f7a4d9bc23b57f5d56 100755 (executable)
@@ -33,7 +33,7 @@ test_commit_message () {
 
 get_author () {
        rev="$1" &&
-       git log -1 --pretty=format:"%an %ae" "$rev"
+       git log -1 --pretty=format:"%an %ae %at" "$rev"
 }
 
 test_expect_success 'setup' '
@@ -196,6 +196,8 @@ test_expect_success 'multiple fixup -c opens editor once' '
                EXPECT_HEADER_COUNT=4 \
                git rebase -i $base &&
        test_cmp_rev $base HEAD^ &&
+       get_author HEAD >actual-author &&
+       test_cmp expected-author actual-author &&
        test 1 = $(git show | grep Modified-A3 | wc -l)
 '