Skip to content

Commit 744c282

Browse files
LemmingAvalanchettaylorr
authored andcommitted
Documentation/git-update-ref.txt: remove safety paragraphs
Remove paragraphs which explain that using this command is safer than echoing the branch name into `HEAD`. Evoking the echo strategy is wrong now under the reftable backend since this file does not exist. And the ref file backend majority user base use porcelain commands to manage `HEAD` unless they are intentionally poking at the implementation. Maybe this warning was relevant for the usage patterns when it was added[1] but now it just takes up space. † 1: 1290563 (Add missing documentation., 2005-10-04) Signed-off-by: Kristoffer Haugsbakk <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent 1b2dfb7 commit 744c282

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

Documentation/git-update-ref.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,6 @@ somewhere else with a regular filename).
4040
If --no-deref is given, <ref> itself is overwritten, rather than
4141
the result of following the symbolic pointers.
4242

43-
In general, using
44-
45-
git update-ref HEAD "$head"
46-
47-
should be a _lot_ safer than doing
48-
49-
echo "$head" > "$GIT_DIR/HEAD"
50-
51-
both from a symlink following standpoint *and* an error checking
52-
standpoint. The "refs/" rule for symlinks means that symlinks
53-
that point to "outside" the tree are safe: they'll be followed
54-
for reading but not for writing (so we'll never write through a
55-
ref symlink to some other tree, if you have copied a whole
56-
archive by creating a symlink tree).
57-
5843
With `-d`, it deletes the named <ref> after verifying that it
5944
still contains <old-oid>.
6045

0 commit comments

Comments
 (0)