t/t3437: check the author date of fixed up commit
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>
Charvi Mendiratta committed
Feb 10, 2021 at 17:06 UTC
4755fed0a6d1390b4520658228617b17b9ee822a
1 file changed
+3
-1
t/t3437-rebase-fixup-options.sh
+3
-1
@@ -33,7 +33,7 @@ test_commit_message () {
33
34
get_author () {
35
rev="$1" &&
36
- git log -1 --pretty=format:"%an %ae" "$rev"
36
+ git log -1 --pretty=format:"%an %ae %at" "$rev"
37
}
38
39
test_expect_success 'setup' '
@@ -196,6 +196,8 @@ test_expect_success 'multiple fixup -c opens editor once' '
196
EXPECT_HEADER_COUNT=4 \
197
git rebase -i $base &&
198
test_cmp_rev $base HEAD^ &&
199
+ get_author HEAD >actual-author &&
200
+ test_cmp expected-author actual-author &&
201
test 1 = $(git show | grep Modified-A3 | wc -l)
202
'
203