]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Documentation/git-update-ref.txt: discuss symbolic refs
authorKristoffer Haugsbakk <code@khaugsbakk.name>
Mon, 21 Oct 2024 20:47:28 +0000 (22:47 +0200)
committerTaylor Blau <me@ttaylorr.com>
Mon, 21 Oct 2024 20:49:31 +0000 (16:49 -0400)
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 <bence@ferdinandy.com>
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Documentation/git-update-ref.txt

index 61647ee84134d8d187ba742fd3b732ffee317dba..2e85f7ce3ee6ceccdc456063653af3e22a61c61d 100644 (file)
@@ -25,6 +25,12 @@ value is <old-oid>.  You can specify 40 "0" or an empty string
 as <old-oid> to make sure that the ref you are creating does
 not exist.
 
+The final arguments are object names; this command without any options
+does not support updating a symbolic ref to point to another ref (see
+linkgit:git-symbolic-ref[1]).  But `git update-ref --stdin` does have
+the `symref-*` commands so that regular refs and symbolic refs can be
+committed in the same transaction.
+
 If --no-deref is given, <ref> itself is overwritten, rather than
 the result of following the symbolic pointers.