"Kristoffer Haugsbakk" <kristofferhaugsbakk@xxxxxxxxxxxx> writes: > On Sun, Oct 13, 2024, at 11:34, Phillip Wood wrote: >>> I do not think update-ref is a tool to modify a symbolic-ref. >> >> Didn't we add support for symbolic-refs to update-ref with >> 'kn/update-ref-symref'? Maybe it only works with --stdin? I've Cc'd >> Karthik for clarification on how it is supposed to work. > > Yes. The man page says that you can use the `symref-update` command > with `--stdin`. > That's correct, we did indeed add support for symref in the --stdin part of `git update-ref`. To give some context, this is because we sometimes want to update regular refs and symrefs in the same transaction. While the underlying code exists, we didn't add support for symrefs without --stdin, mostly because `git symbolic-ref` already exists. > So the issue or confusion here seems to be that you have to use specific > commands for symrefs. git-update-ref(1) won’t try to figure it out. > I agree, the documentation here could use some cleanup. The confusion here lies around It also allows a "ref" file to be a symbolic pointer to another ref file by starting with the four-byte header sequence of "ref:". This is added to talk about how the command de-references symbolic refs, but it can be misinterpreted to mean that it does support symbolic refs on the top level. Do either of you want to take a stab at updating the documentation here? > That seems in line with a plumbing command. > > -- > Kristoffer Haugsbakk
Attachment:
signature.asc
Description: PGP signature