]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t1410: use test-tool to create empty reflog
authorPatrick Steinhardt <ps@pks.im>
Wed, 29 Nov 2023 07:24:53 +0000 (08:24 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 3 Dec 2023 02:50:23 +0000 (11:50 +0900)
One of the tests in t1410 is marked to be specific to the files
reference backend, which is because we create a reflog manually by
creating the respective file. Refactor the test to instead use our
`test-tool ref-store` helper to create the reflog so that it works with
other reference backends, as well.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1410-reflog.sh

index aeddc2fb3f69516921733c49ad6211c00bf066d3..a0ff8d51f04b2d9ad34060a4f42290577d6673f7 100755 (executable)
@@ -469,11 +469,11 @@ test_expect_success 'expire one of multiple worktrees' '
        )
 '
 
-test_expect_success REFFILES 'empty reflog' '
+test_expect_success 'empty reflog' '
        test_when_finished "rm -rf empty" &&
        git init empty &&
        test_commit -C empty A &&
-       >empty/.git/logs/refs/heads/foo &&
+       test-tool ref-store main create-reflog refs/heads/foo &&
        git -C empty reflog expire --all 2>err &&
        test_must_be_empty err
 '