aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-update-ref.txt
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2020-07-27 16:25:46 +0000
committerJunio C Hamano <gitster@pobox.com>2020-07-27 10:06:49 -0700
commit09743417a201511888aee42480e468ebf47fcecb (patch)
treeaa67e2cfc5aeb7229e7d7daeb153460785287c85 /Documentation/git-update-ref.txt
parent0b7de6c6835051a92ae3e2ff306583f5780c7ae1 (diff)
downloadgit-09743417a201511888aee42480e468ebf47fcecb.tar.gz
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 'Documentation/git-update-ref.txt')
-rw-r--r--Documentation/git-update-ref.txt13
1 files changed, 7 insertions, 6 deletions
diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt
index 3e737c2360..d401234b03 100644
--- a/Documentation/git-update-ref.txt
+++ b/Documentation/git-update-ref.txt
@@ -148,12 +148,13 @@ still see a subset of the modifications.
LOGGING UPDATES
---------------
-If config parameter "core.logAllRefUpdates" is true and the ref is one under
-"refs/heads/", "refs/remotes/", "refs/notes/", or the symbolic ref HEAD; or
-the file "$GIT_DIR/logs/<ref>" exists then `git update-ref` will append
-a line to the log file "$GIT_DIR/logs/<ref>" (dereferencing all
-symbolic refs before creating the log name) describing the change
-in ref value. Log lines are formatted as:
+If config parameter "core.logAllRefUpdates" is true and the ref is one
+under "refs/heads/", "refs/remotes/", "refs/notes/", or a pseudoref
+like HEAD or ORIG_HEAD; or the file "$GIT_DIR/logs/<ref>" exists then
+`git update-ref` will append a line to the log file
+"$GIT_DIR/logs/<ref>" (dereferencing all symbolic refs before creating
+the log name) describing the change in ref value. Log lines are
+formatted as:
oldsha1 SP newsha1 SP committer LF