]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t3432: use git-reflog to inspect the reflog for HEAD
authorHan-Wen Nienhuys <hanwen@google.com>
Fri, 10 Jul 2020 17:19:51 +0000 (17:19 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Jul 2020 20:53:37 +0000 (13:53 -0700)
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3432-rebase-fast-forward.sh

index 6f0452c0eac516796e27c5689b2e091c2b21b8ce..a29eda87e9a1265bcddd300628bf43f4167e47e3 100755 (executable)
@@ -60,15 +60,16 @@ test_rebase_same_head_ () {
                fi &&
                oldhead=\$(git rev-parse HEAD) &&
                test_when_finished 'git reset --hard \$oldhead' &&
-               cp .git/logs/HEAD expect &&
+               git reflog HEAD >expect &&
                git rebase$flag $* >stdout &&
+               git reflog HEAD >actual &&
                if test $what = work
                then
                        old=\$(wc -l <expect) &&
-                       test_line_count '-gt' \$old .git/logs/HEAD
+                       test_line_count '-gt' \$old actual
                elif test $what = noop
                then
-                       test_cmp expect .git/logs/HEAD
+                       test_cmp expect actual
                fi &&
                newhead=\$(git rev-parse HEAD) &&
                if test $cmp = same