Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2020-07-27 19:25:46 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-27 20:06:49 +0300
commit09743417a201511888aee42480e468ebf47fcecb (patch)
treeaa67e2cfc5aeb7229e7d7daeb153460785287c85 /t/t1405-main-ref-store.sh
parent0b7de6c6835051a92ae3e2ff306583f5780c7ae1 (diff)
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-xt/t1405-main-ref-store.sh5
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 --
'