From: Kristoffer Haugsbakk Date: Mon, 21 Oct 2024 20:47:28 +0000 (+0200) Subject: Documentation/git-update-ref.txt: discuss symbolic refs X-Git-Tag: v2.48.0-rc0~75^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74522b6b12ead82d4e9a39771b8a5cf287e0cb4a;p=thirdparty%2Fgit.git 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 `` and `` 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 Signed-off-by: Kristoffer Haugsbakk Signed-off-by: Taylor Blau --- diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt index 61647ee841..2e85f7ce3e 100644 --- a/Documentation/git-update-ref.txt +++ b/Documentation/git-update-ref.txt @@ -25,6 +25,12 @@ value is . You can specify 40 "0" or an empty string as 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, itself is overwritten, rather than the result of following the symbolic pointers.