diff mbox series

[5/6] doc: update-ref: discuss symbolic links

Message ID 3575fb48c932f50b2a3f6fb0e582b3c2a9b087af.1729017728.git.code@khaugsbakk.name (mailing list archive)
State New
Headers show
Series doc: update-ref: amend old material and discuss symrefs | expand

Commit Message

Kristoffer Haugsbakk Oct. 15, 2024, 7:03 p.m. UTC
From: Kristoffer Haugsbakk <code@khaugsbakk.name>

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 to stray
interpretation.

This is also a good place to mention why `--stdin` has those `symref-*`
commands.

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 Documentation/git-update-ref.txt | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Kristoffer Haugsbakk Oct. 15, 2024, 7:08 p.m. UTC | #1
On Tue, Oct 15, 2024, at 21:03, kristofferhaugsbakk@fastmail.com wrote:
> From: Kristoffer Haugsbakk <code@khaugsbakk.name>

Tsk. Subject should have been “discuss symbolic refs”.
Taylor Blau Oct. 16, 2024, 8:52 p.m. UTC | #2
On Tue, Oct 15, 2024 at 09:08:29PM +0200, Kristoffer Haugsbakk wrote:
> On Tue, Oct 15, 2024, at 21:03, kristofferhaugsbakk@fastmail.com wrote:
> > From: Kristoffer Haugsbakk <code@khaugsbakk.name>
>
> Tsk. Subject should have been “discuss symbolic refs”.

Agreed.

Thanks,
Taylor
diff mbox series

Patch

diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt
index 4bb3389cc7c..623c4d860eb 100644
--- a/Documentation/git-update-ref.txt
+++ b/Documentation/git-update-ref.txt
@@ -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 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.