summaryrefslogtreecommitdiff
path: root/t/t1405-main-ref-store.sh
diff options
context:
space:
mode:
authorLibravatar Han-Wen Nienhuys <hanwen@google.com>2022-01-31 17:50:18 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-01-31 15:32:40 -0800
commit5e00514745bc9cba21fde44c9bb2b6aa162be653 (patch)
tree2fc5ea9ffb4382682e028a3294409bea920aebfa /t/t1405-main-ref-store.sh
parentSync with Git 2.35.1 (diff)
downloadtgif-5e00514745bc9cba21fde44c9bb2b6aa162be653.tar.xz
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>
Diffstat (limited to 't/t1405-main-ref-store.sh')
-rwxr-xr-xt/t1405-main-ref-store.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh
index 1a3ee8845d..62e5e9d1b0 100755
--- a/t/t1405-main-ref-store.sh
+++ b/t/t1405-main-ref-store.sh
@@ -40,6 +40,12 @@ test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '
test_must_fail git rev-parse refs/tags/new-tag --
'
+# In reftable, we keep the reflogs around for deleted refs.
+test_expect_success !REFFILES 'delete-reflog(FOO, refs/tags/new-tag)' '
+ $RUN delete-reflog FOO &&
+ $RUN delete-reflog refs/tags/new-tag
+'
+
test_expect_success 'rename_refs(main, new-main)' '
git rev-parse main >expected &&
$RUN rename-ref refs/heads/main refs/heads/new-main &&