diff options
author | Han-Wen Nienhuys <hanwen@google.com> | 2022-01-31 18:50:18 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-01 00:32:40 +0100 |
commit | 5e00514745bc9cba21fde44c9bb2b6aa162be653 (patch) | |
tree | 2fc5ea9ffb4382682e028a3294409bea920aebfa /t | |
parent | Sync with Git 2.35.1 (diff) | |
download | git-5e00514745bc9cba21fde44c9bb2b6aa162be653.tar.xz git-5e00514745bc9cba21fde44c9bb2b6aa162be653.zip |
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 '')
-rwxr-xr-x | t/t1405-main-ref-store.sh | 6 |
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 && |