Skip to content

Commit 5e00514

Browse files
hanwengitster
authored andcommitted
t1405: explictly delete reflogs for reftable
Deleting a ref in reftable just records a (ObjectID => ZeroID) transaction in the reflog. To ensure 'for_each_reflog()' test below works, explictly delete reflogs for deleted refs. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 5d01301 commit 5e00514

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/t1405-main-ref-store.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '
4040
test_must_fail git rev-parse refs/tags/new-tag --
4141
'
4242

43+
# In reftable, we keep the reflogs around for deleted refs.
44+
test_expect_success !REFFILES 'delete-reflog(FOO, refs/tags/new-tag)' '
45+
$RUN delete-reflog FOO &&
46+
$RUN delete-reflog refs/tags/new-tag
47+
'
48+
4349
test_expect_success 'rename_refs(main, new-main)' '
4450
git rev-parse main >expected &&
4551
$RUN rename-ref refs/heads/main refs/heads/new-main &&

0 commit comments

Comments
 (0)