@matheusbsbs / matheus-bagliano / commits / ce57d85645
Fork 0

t3432: use git-reflog to inspect the reflog for HEAD

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Han-Wen Nienhuys committed Jul 10, 2020 at 17:19 UTC ce57d85645540fe59e8ec84929288361f1affae7
1 file changed +4 -3
t/t3432-rebase-fast-forward.sh
+4 -3
@@ -60,15 +60,16 @@ test_rebase_same_head_ () {
60 fi &&
61 oldhead=\$(git rev-parse HEAD) &&
62 test_when_finished 'git reset --hard \$oldhead' &&
63 - cp .git/logs/HEAD expect &&
63 + git reflog HEAD >expect &&
64 git rebase$flag $* >stdout &&
65 + git reflog HEAD >actual &&
66 if test $what = work
67 then
68 old=\$(wc -l <expect) &&
68 - test_line_count '-gt' \$old .git/logs/HEAD
69 + test_line_count '-gt' \$old actual
70 elif test $what = noop
71 then
71 - test_cmp expect .git/logs/HEAD
72 + test_cmp expect actual
73 fi &&
74 newhead=\$(git rev-parse HEAD) &&
75 if test $cmp = same