]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t7004: use "test-tool ref-store" for reflog inspection
authorHan-Wen Nienhuys <hanwen@google.com>
Wed, 22 Dec 2021 10:59:44 +0000 (10:59 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Dec 2021 20:13:02 +0000 (12:13 -0800)
This makes the test work with reftable.

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

index 301d11904829f5952bb9d0c00e0c1ee8bb8b8d5d..bc8a221b2c7ca2343d62b94974c3119907c406f8 100755 (executable)
@@ -97,7 +97,7 @@ test_expect_success 'creating a tag with --create-reflog should create reflog' '
        test_when_finished "git tag -d tag_with_reflog1" &&
        git tag --create-reflog tag_with_reflog1 &&
        git reflog exists refs/tags/tag_with_reflog1 &&
-       sed -e "s/^.*   //" .git/logs/refs/tags/tag_with_reflog1 >actual &&
+       test-tool ref-store main for-each-reflog-ent refs/tags/tag_with_reflog1 | sed -e "s/^.* //" >actual &&
        test_cmp expected actual
 '
 
@@ -108,7 +108,7 @@ test_expect_success 'annotated tag with --create-reflog has correct message' '
        test_when_finished "git tag -d tag_with_reflog2" &&
        git tag -m "annotated tag" --create-reflog tag_with_reflog2 &&
        git reflog exists refs/tags/tag_with_reflog2 &&
-       sed -e "s/^.*   //" .git/logs/refs/tags/tag_with_reflog2 >actual &&
+       test-tool ref-store main for-each-reflog-ent refs/tags/tag_with_reflog2 | sed -e "s/^.* //" >actual &&
        test_cmp expected actual
 '