diff options
author | Han-Wen Nienhuys <hanwen@google.com> | 2020-07-27 16:25:46 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-27 10:06:49 -0700 |
commit | 09743417a201511888aee42480e468ebf47fcecb (patch) | |
tree | aa67e2cfc5aeb7229e7d7daeb153460785287c85 /t/t1405-main-ref-store.sh | |
parent | t1400: use git rev-parse for testing PSEUDOREF existence (diff) | |
download | tgif-09743417a201511888aee42480e468ebf47fcecb.tar.xz |
Modify pseudo refs through ref backend storage
The previous behavior was introduced in commit 74ec19d4be
("pseudorefs: create and use pseudoref update and delete functions",
Jul 31, 2015), with the justification "alternate ref backends still
need to store pseudorefs in GIT_DIR".
Refs such as REBASE_HEAD are read through the ref backend. This can
only work consistently if they are written through the ref backend as
well. Tooling that works directly on files under .git should be
updated to use git commands to read refs instead.
The following behaviors change:
* Updates to pseudorefs (eg. ORIG_HEAD) with
core.logAllRefUpdates=always will create reflogs for the pseudoref.
* non-HEAD pseudoref symrefs are also dereferenced on deletion. Update
t1405 accordingly.
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-x | t/t1405-main-ref-store.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh index 331899ddc4..74af927fba 100755 --- a/t/t1405-main-ref-store.sh +++ b/t/t1405-main-ref-store.sh @@ -31,7 +31,10 @@ test_expect_success 'create_symref(FOO, refs/heads/master)' ' test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' ' git rev-parse FOO -- && git rev-parse refs/tags/new-tag -- && - $RUN delete-refs 0 nothing FOO refs/tags/new-tag && + m=$(git rev-parse master) && + REF_NO_DEREF=1 && + $RUN delete-refs $REF_NO_DEREF nothing FOO refs/tags/new-tag && + test_must_fail git rev-parse --symbolic-full-name FOO && test_must_fail git rev-parse FOO -- && test_must_fail git rev-parse refs/tags/new-tag -- ' |