]> git.ipfire.org Git - thirdparty/git.git/commit - t/t1400-update-ref.sh
Modify pseudo refs through ref backend storage
authorHan-Wen Nienhuys <hanwen@google.com>
Mon, 27 Jul 2020 16:25:46 +0000 (16:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Jul 2020 17:06:49 +0000 (10:06 -0700)
commit09743417a201511888aee42480e468ebf47fcecb
treeaa67e2cfc5aeb7229e7d7daeb153460785287c85
parent0b7de6c6835051a92ae3e2ff306583f5780c7ae1
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>
Documentation/git-update-ref.txt
refs.c
t/t1400-update-ref.sh
t/t1405-main-ref-store.sh