Skip to content

Commit 74522b6

Browse files
LemmingAvalanchettaylorr
authored andcommitted
Documentation/git-update-ref.txt: discuss symbolic refs
Add a paragraph which just emphasizes that the command without any options does not support refs in the final arguments. This is clear already from the names `<new-oid>` and `<old-oid>` but the right balance of redundancy makes documentation robust against stray interpretation. This is also a good place to mention why `--stdin` has those `symref-*` commands. Suggested-by: Bence Ferdinandy <[email protected]> Signed-off-by: Kristoffer Haugsbakk <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent 793e308 commit 74522b6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Documentation/git-update-ref.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ value is <old-oid>. You can specify 40 "0" or an empty string
2525
as <old-oid> to make sure that the ref you are creating does
2626
not exist.
2727

28+
The final arguments are object names; this command without any options
29+
does not support updating a symbolic ref to point to another ref (see
30+
linkgit:git-symbolic-ref[1]). But `git update-ref --stdin` does have
31+
the `symref-*` commands so that regular refs and symbolic refs can be
32+
committed in the same transaction.
33+
2834
If --no-deref is given, <ref> itself is overwritten, rather than
2935
the result of following the symbolic pointers.
3036

0 commit comments

Comments
 (0)