{"thread":{"id":"62319","subject":"ref: with git update-ref?","startedAt":"2024-10-11T20:51:50Z","lastAt":"2024-10-21T20:50:49Z","messageCount":54,"participants":["Bence Ferdinandy","Kristoffer Haugsbakk","Junio C Hamano","Andreas Schwab","Phillip Wood","karthik nayak","kristofferhaugsbakk@fastmail.com","Taylor Blau","Eric Sunshine"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"504879","messageId":"D4T9VCF8OS6U.1FMB8P6YU7I3S@ferdinandy.com","threadId":"62319","inReplyTo":null,"subject":"ref: with git update-ref?","fromName":"Bence Ferdinandy","fromEmail":"bence@ferdinandy.com","sentAt":"2024-10-11T20:51:08Z","receivedAt":"2024-10-11T20:51:50Z","isPatch":false,"sender":{"key":"bence@ferdinandy.com","avatar":"https://avatars.githubusercontent.com/u/6343487?v=4"},"body":"Hi,\n\nthe documentation for `git update-ref` has this sentence:\n\n> It also allows a \"ref\" file to be a symbolic pointer to another\n> ref file by starting with the four-byte header sequence of\n> \"ref:\".\n\nAfter fumbling around a bit and getting errors like \n\nfatal: ref:refs/remotes/origin/test: not a valid SHA1\n\nI looked in builtin/update-ref.c and I do not see a call to refs_update_symref\nnor any checks for \"ref:\". Am I missing something here?\n\nThanks,\nBence\n\n-- \nbence.ferdinandy.com\n\n"},{"id":"504880","messageId":"cb60b7ad-7902-4293-81e9-06d1b1526842@app.fastmail.com","threadId":"62319","inReplyTo":"D4T9VCF8OS6U.1FMB8P6YU7I3S@ferdinandy.com","subject":"Re: with git update-ref?","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-11T20:56:44Z","receivedAt":"2024-10-11T20:57:06Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Fri, Oct 11, 2024, at 22:51, Bence Ferdinandy wrote:\n> Hi,\n>\n> the documentation for `git update-ref` has this sentence:\n>\n>> It also allows a \"ref\" file to be a symbolic pointer to another\n>> ref file by starting with the four-byte header sequence of\n>> \"ref:\".\n>\n> After fumbling around a bit and getting errors like \n>\n> fatal: ref:refs/remotes/origin/test: not a valid SHA1\n\n`ref: refs/remotes/origin/test`? (space after colon)\n"},{"id":"504881","messageId":"D4TA5EXQFFA0.1XVEK1RM2Q6VA@ferdinandy.com","threadId":"62319","inReplyTo":"cb60b7ad-7902-4293-81e9-06d1b1526842@app.fastmail.com","subject":"Re: with git update-ref?","fromName":"Bence Ferdinandy","fromEmail":"bence@ferdinandy.com","sentAt":"2024-10-11T21:04:17Z","receivedAt":"2024-10-11T21:05:02Z","isPatch":false,"sender":{"key":"bence@ferdinandy.com","avatar":"https://avatars.githubusercontent.com/u/6343487?v=4"},"body":"\nOn Fri Oct 11, 2024 at 22:56, Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote:\n> `ref: refs/remotes/origin/test`? (space after colon)\n\nI tried a couple of variations and no:\n\n❯ git update-ref --no-deref refs/remotes/origin/HEAD 'ref: refs/remotes/origin/test'\nfatal: ref: refs/remotes/origin/test: not a valid SHA1\n❯ git update-ref refs/remotes/origin/HEAD 'ref: refs/remotes/origin/test'\nfatal: ref: refs/remotes/origin/test: not a valid SHA1\n❯ git update-ref --no-deref refs/remotes/origin/HEAD 'ref:refs/remotes/origin/test'\nfatal: ref:refs/remotes/origin/test: not a valid SHA1\n❯ git update-ref  refs/remotes/origin/HEAD 'ref:refs/remotes/origin/test'\nfatal: ref:refs/remotes/origin/test: not a valid SHA1\n\nI guess the intended way of doing this is via git symbolic-ref anyway, but I'm\ncurious if this should work somehow or I'm misinterpreting the meaning of that\nsentence.\n\n-- \nbence.ferdinandy.com\n\n"},{"id":"504883","messageId":"xmqqa5facosb.fsf@gitster.g","threadId":"62319","inReplyTo":"D4TA5EXQFFA0.1XVEK1RM2Q6VA@ferdinandy.com","subject":"Re: with git update-ref?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-10-11T21:28:36Z","receivedAt":"2024-10-11T21:28:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Bence Ferdinandy\" <bence@ferdinandy.com> writes:\n\n> On Fri Oct 11, 2024 at 22:56, Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote:\n>> `ref: refs/remotes/origin/test`? (space after colon)\n>\n> I tried a couple of variations and no:\n>\n> ❯ git update-ref --no-deref refs/remotes/origin/HEAD 'ref: refs/remotes/origin/test'\n> fatal: ref: refs/remotes/origin/test: not a valid SHA1\n> ❯ git update-ref refs/remotes/origin/HEAD 'ref: refs/remotes/origin/test'\n> fatal: ref: refs/remotes/origin/test: not a valid SHA1\n> ❯ git update-ref --no-deref refs/remotes/origin/HEAD 'ref:refs/remotes/origin/test'\n> fatal: ref:refs/remotes/origin/test: not a valid SHA1\n> ❯ git update-ref  refs/remotes/origin/HEAD 'ref:refs/remotes/origin/test'\n> fatal: ref:refs/remotes/origin/test: not a valid SHA1\n>\n> I guess the intended way of doing this is via git symbolic-ref anyway, but I'm\n> curious if this should work somehow or I'm misinterpreting the meaning of that\n> sentence.\n\nI do not think update-ref is a tool to modify a symbolic-ref.\nMoreover, the mention of \"ref:\" is meant to be for those who are\noverly curious for their own good and go peek into their .git/\ndirectory; script writers should not have to know such an\nimplementation detail.\n\n: ask what the current state is.\n$ git symbolic-ref refs/remotes/origin/HEAD\nfatal: ref refs/remotes/origin/HEAD is not a symbolic ref\n\n: set it\n$ git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main\n\n: inspect the result\n$ git symbolic-ref refs/remotes/origin/HEAD\nrefs/remotes/origin/master\n\nThanks.\n"},{"id":"504905","messageId":"87ttdhsuqz.fsf@igel.home","threadId":"62319","inReplyTo":"D4T9VCF8OS6U.1FMB8P6YU7I3S@ferdinandy.com","subject":"Re: ref: with git update-ref?","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2024-10-12T06:25:24Z","receivedAt":"2024-10-12T06:25:32Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"On Okt 11 2024, Bence Ferdinandy wrote:\n\n> the documentation for `git update-ref` has this sentence:\n>\n>> It also allows a \"ref\" file to be a symbolic pointer to another\n>> ref file by starting with the four-byte header sequence of\n>> \"ref:\".\n\nThis is about the format of the reference to be updated, not the\n<new-oid> argument.\n\nSee gitglossary(1):\n\n       symref\n           Symbolic reference: instead of containing the SHA-1 id itself, it\n           is of the format ref: refs/some/thing and when referenced, it\n           recursively dereferences to this reference.  HEAD is a prime\n           example of a symref. Symbolic references are manipulated with the\n           git-symbolic-ref(1) command.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1\n\"And now for something completely different.\"\n"},{"id":"504926","messageId":"D4U30MD29CJT.3US5SBR598DVY@ferdinandy.com","threadId":"62319","inReplyTo":"xmqqa5facosb.fsf@gitster.g","subject":"Re: with git update-ref?","fromName":"Bence Ferdinandy","fromEmail":"bence@ferdinandy.com","sentAt":"2024-10-12T19:41:34Z","receivedAt":"2024-10-12T19:42:02Z","isPatch":false,"sender":{"key":"bence@ferdinandy.com","avatar":"https://avatars.githubusercontent.com/u/6343487?v=4"},"body":"\nOn Fri Oct 11, 2024 at 23:28, Junio C Hamano <gitster@pobox.com> wrote:\n> \"Bence Ferdinandy\" <bence@ferdinandy.com> writes:\n>\n>> On Fri Oct 11, 2024 at 22:56, Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote:\n>>> `ref: refs/remotes/origin/test`? (space after colon)\n>>\n>> I tried a couple of variations and no:\n>>\n>> ❯ git update-ref --no-deref refs/remotes/origin/HEAD 'ref: refs/remotes/origin/test'\n>> fatal: ref: refs/remotes/origin/test: not a valid SHA1\n>> ❯ git update-ref refs/remotes/origin/HEAD 'ref: refs/remotes/origin/test'\n>> fatal: ref: refs/remotes/origin/test: not a valid SHA1\n>> ❯ git update-ref --no-deref refs/remotes/origin/HEAD 'ref:refs/remotes/origin/test'\n>> fatal: ref:refs/remotes/origin/test: not a valid SHA1\n>> ❯ git update-ref  refs/remotes/origin/HEAD 'ref:refs/remotes/origin/test'\n>> fatal: ref:refs/remotes/origin/test: not a valid SHA1\n>>\n>> I guess the intended way of doing this is via git symbolic-ref anyway, but I'm\n>> curious if this should work somehow or I'm misinterpreting the meaning of that\n>> sentence.\n>\n> I do not think update-ref is a tool to modify a symbolic-ref.\n> Moreover, the mention of \"ref:\" is meant to be for those who are\n> overly curious for their own good and go peek into their .git/\n> directory; script writers should not have to know such an\n> implementation detail.\n\nYes, that was my impression as well, but I think it is pretty misleadning\nbecause \"It also\" is preceded by an entire paragraph about what you can specify\nwith oids so it's easy to read as if you could specify a symbolic ref here.\nBecause of the --no-deref argument it makes sense to talk about symrefs, but\nI'd propose to rewrite this part a bit to make it more clear. Something along\nthe lines of referencing gitglossary(1) (thanks Andreas) for what symrefs are\ninstead of explaining here and explicitly mentioning that it's git symbolic-ref\nthat is for manipulating symrefs.\n\nBest,\nBence\n\n\n-- \nbence.ferdinandy.com\n\n"},{"id":"504942","messageId":"f7a7046c-020a-4365-baf4-49184bd2c60b@gmail.com","threadId":"62319","inReplyTo":"xmqqa5facosb.fsf@gitster.g","subject":"Re: with git update-ref?","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2024-10-13T09:34:36Z","receivedAt":"2024-10-13T09:34:39Z","isPatch":false,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 11/10/2024 22:28, Junio C Hamano wrote:\n> \"Bence Ferdinandy\" <bence@ferdinandy.com> writes:\n> \n>> On Fri Oct 11, 2024 at 22:56, Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote:\n>>> `ref: refs/remotes/origin/test`? (space after colon)\n>>\n>> I tried a couple of variations and no:\n>>\n>> ❯ git update-ref --no-deref refs/remotes/origin/HEAD 'ref: refs/remotes/origin/test'\n>> fatal: ref: refs/remotes/origin/test: not a valid SHA1\n>> ❯ git update-ref refs/remotes/origin/HEAD 'ref: refs/remotes/origin/test'\n>> fatal: ref: refs/remotes/origin/test: not a valid SHA1\n>> ❯ git update-ref --no-deref refs/remotes/origin/HEAD 'ref:refs/remotes/origin/test'\n>> fatal: ref:refs/remotes/origin/test: not a valid SHA1\n>> ❯ git update-ref  refs/remotes/origin/HEAD 'ref:refs/remotes/origin/test'\n>> fatal: ref:refs/remotes/origin/test: not a valid SHA1\n>>\n>> I guess the intended way of doing this is via git symbolic-ref anyway, but I'm\n>> curious if this should work somehow or I'm misinterpreting the meaning of that\n>> sentence.\n> \n> I do not think update-ref is a tool to modify a symbolic-ref.\n\nDidn't we add support for symbolic-refs to update-ref with \n'kn/update-ref-symref'? Maybe it only works with --stdin? I've Cc'd \nKarthik for clarification on how it is supposed to work.\n\nBest Wishes\n\nPhillip\n\n> Moreover, the mention of \"ref:\" is meant to be for those who are\n> overly curious for their own good and go peek into their .git/\n> directory; script writers should not have to know such an\n> implementation detail.\n> \n> : ask what the current state is.\n> $ git symbolic-ref refs/remotes/origin/HEAD\n> fatal: ref refs/remotes/origin/HEAD is not a symbolic ref\n> \n> : set it\n> $ git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main\n> \n> : inspect the result\n> $ git symbolic-ref refs/remotes/origin/HEAD\n> refs/remotes/origin/master\n> \n> Thanks.\n> \n\n"},{"id":"504944","messageId":"16d2d47c-5887-4658-b6db-996dac075828@app.fastmail.com","threadId":"62319","inReplyTo":"f7a7046c-020a-4365-baf4-49184bd2c60b@gmail.com","subject":"Re: with git update-ref?","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-13T10:07:25Z","receivedAt":"2024-10-13T10:07:47Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Sun, Oct 13, 2024, at 11:34, Phillip Wood wrote:\n>> I do not think update-ref is a tool to modify a symbolic-ref.\n>\n> Didn't we add support for symbolic-refs to update-ref with\n> 'kn/update-ref-symref'? Maybe it only works with --stdin? I've Cc'd\n> Karthik for clarification on how it is supposed to work.\n\nYes.  The man page says that you can use the `symref-update` command\nwith `--stdin`.\n\nSo the issue or confusion here seems to be that you have to use specific\ncommands for symrefs.  git-update-ref(1) won’t try to figure it out.\n\nThat seems in line with a plumbing command.\n\n-- \nKristoffer Haugsbakk\n\n"},{"id":"504946","messageId":"CAOLa=ZQJy1ZkQqBoWwJJvL0f+NCP=3SAfyeSNuztgApzNH1mGg@mail.gmail.com","threadId":"62319","inReplyTo":"16d2d47c-5887-4658-b6db-996dac075828@app.fastmail.com","subject":"Re: with git update-ref?","fromName":"karthik nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2024-10-13T12:09:14Z","receivedAt":"2024-10-13T12:09:16Z","isPatch":false,"sender":{"key":"karthik.188@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1786334?v=4"},"body":"\"Kristoffer Haugsbakk\" <kristofferhaugsbakk@fastmail.com> writes:\n\n> On Sun, Oct 13, 2024, at 11:34, Phillip Wood wrote:\n>>> I do not think update-ref is a tool to modify a symbolic-ref.\n>>\n>> Didn't we add support for symbolic-refs to update-ref with\n>> 'kn/update-ref-symref'? Maybe it only works with --stdin? I've Cc'd\n>> Karthik for clarification on how it is supposed to work.\n>\n> Yes.  The man page says that you can use the `symref-update` command\n> with `--stdin`.\n>\n\nThat's correct, we did indeed add support for symref in the --stdin part\nof `git update-ref`. To give some context, this is because we sometimes\nwant to update regular refs and symrefs in the same transaction. While\nthe underlying code exists, we didn't add support for symrefs without\n--stdin, mostly because `git symbolic-ref` already exists.\n\n> So the issue or confusion here seems to be that you have to use specific\n> commands for symrefs.  git-update-ref(1) won’t try to figure it out.\n>\n\nI agree, the documentation here could use some cleanup. The confusion\nhere lies around\n\n    It also allows a \"ref\" file to be a symbolic pointer to another ref\n    file by starting with the four-byte header sequence of \"ref:\".\n\nThis is added to talk about how the command de-references symbolic refs,\nbut it can be misinterpreted to mean that it does support symbolic refs\non the top level.\n\nDo either of you want to take a stab at updating the documentation here?\n\n> That seems in line with a plumbing command.\n>\n> --\n> Kristoffer Haugsbakk\n"},{"id":"504952","messageId":"ef5a38af-e2bf-49f3-8611-6134970f829b@app.fastmail.com","threadId":"62319","inReplyTo":"CAOLa=ZQJy1ZkQqBoWwJJvL0f+NCP=3SAfyeSNuztgApzNH1mGg@mail.gmail.com","subject":"Re: with git update-ref?","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-13T15:39:30Z","receivedAt":"2024-10-13T15:40:06Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"\nOn Sun, Oct 13, 2024, at 14:09, karthik nayak wrote:\n>\n> I agree, the documentation here could use some cleanup. The confusion\n> here lies around\n>\n>     It also allows a \"ref\" file to be a symbolic pointer to another ref\n>     file by starting with the four-byte header sequence of \"ref:\".\n>\n> This is added to talk about how the command de-references symbolic refs,\n> but it can be misinterpreted to mean that it does support symbolic refs\n> on the top level.\n>\n> Do either of you want to take a stab at updating the documentation here?\n>\n>> That seems in line with a plumbing command.\n>>\n>> --\n>> Kristoffer Haugsbakk\n>\n> Attachments:\n> * signature.asc\n\nI wonder if the third (It also) and the fourth\n(about FS symlinks) could be removed. The\nthird is confusing like Bernard said and the\nfourth doesn't seem relevant enough any more. Not relevant enough to be part of Description.\n\nAnd the \"safety\" paragraphs could be moved\nto its own section. Because it looks like it's meant as an advice to unlearn the habits of a Git user from, I don't know, 2005 maybe.\n"},{"id":"504956","messageId":"D4UYWECVEIXX.25JAWP39XGC73@ferdinandy.com","threadId":"62319","inReplyTo":"ef5a38af-e2bf-49f3-8611-6134970f829b@app.fastmail.com","subject":"Re: with git update-ref?","fromName":"Bence Ferdinandy","fromEmail":"bence@ferdinandy.com","sentAt":"2024-10-13T20:40:39Z","receivedAt":"2024-10-13T20:41:20Z","isPatch":false,"sender":{"key":"bence@ferdinandy.com","avatar":"https://avatars.githubusercontent.com/u/6343487?v=4"},"body":"\nOn Sun Oct 13, 2024 at 17:39, Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote:\n>\n> On Sun, Oct 13, 2024, at 14:09, karthik nayak wrote:\n>>\n>> I agree, the documentation here could use some cleanup. The confusion\n>> here lies around\n>>\n>>     It also allows a \"ref\" file to be a symbolic pointer to another ref\n>>     file by starting with the four-byte header sequence of \"ref:\".\n>>\n>> This is added to talk about how the command de-references symbolic refs,\n>> but it can be misinterpreted to mean that it does support symbolic refs\n>> on the top level.\n>>\n>> Do either of you want to take a stab at updating the documentation here?\n>>\n>>> That seems in line with a plumbing command.\n>>>\n>>> --\n>>> Kristoffer Haugsbakk\n>>\n>> Attachments:\n>> * signature.asc\n>\n> I wonder if the third (It also) and the fourth\n> (about FS symlinks) could be removed. The\n> third is confusing like Bernard said and the\n> fourth doesn't seem relevant enough any more. Not relevant enough to be part of Description.\n>\n> And the \"safety\" paragraphs could be moved\n> to its own section. Because it looks like it's meant as an advice to unlearn the habits of a Git user from, I don't know, 2005 maybe.\n\nAccording to git blame on the manpage, 2005 is spot on :)\n\n\n\n-- \nbence.ferdinandy.com\n\n"},{"id":"505030","messageId":"756c9e41-f53c-485e-b2e0-a67fdc9372b7@app.fastmail.com","threadId":"62319","inReplyTo":"CAOLa=ZQJy1ZkQqBoWwJJvL0f+NCP=3SAfyeSNuztgApzNH1mGg@mail.gmail.com","subject":"Re: with git update-ref?","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-14T15:06:19Z","receivedAt":"2024-10-14T15:06:42Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Sun, Oct 13, 2024, at 14:09, karthik nayak wrote:\n>     It also allows a \"ref\" file to be a symbolic pointer to another ref\n>     file by starting with the four-byte header sequence of \"ref:\".\n>\n> This is added to talk about how the command de-references symbolic refs,\n> but it can be misinterpreted to mean that it does support symbolic refs\n> on the top level.\n>\n> Do either of you want to take a stab at updating the documentation here?\n\nI have some ideas. I think I should have something ready later this\nevening.\n\n-- \nKristoffer Haugsbakk\n"},{"id":"505187","messageId":"cover.1729017728.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"CAOLa=ZQJy1ZkQqBoWwJJvL0f+NCP=3SAfyeSNuztgApzNH1mGg@mail.gmail.com","subject":"[PATCH 0/6] doc: update-ref: amend old material and discuss symrefs","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-15T19:03:09Z","receivedAt":"2024-10-15T19:05:01Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\n(See the previous email for the context)\n\nThis series removes or moves some old material in the update-ref doc and\nimproves the discussion of symrefs, opting for a high-level description\nwith some redundancy (see patch 5/6) in order to avoid a reported\nmistake/confusion.\n\nThe end goal (after all patches are applied):\n\n• First paragraph (in Description) describes the first form\n• Second paragraph the second form\n• Third paragraph mentions symrefs and explains why `--stdin` supports\n  them\n• A new section whither the symlink (FS) vs. symrefs (`ref: ` files… or\n  strings nowadays with the different formats that refs can have?)\n  discussion is moved\n• Link update-ref to symbolic-ref and vice versa\n\nKristoffer Haugsbakk (6):\n  doc: update-ref: drop “flag”\n  doc: update-ref: remove safety paragraphs\n  doc: update-ref: demote symlink to last section\n  doc: update-ref: remove confusing paragraph\n  doc: update-ref: discuss symbolic links\n  doc: mutually link update-ref and symbolic-ref\n\n Documentation/git-symbolic-ref.txt |  4 +++\n Documentation/git-update-ref.txt   | 48 +++++++++++++-----------------\n 2 files changed, 25 insertions(+), 27 deletions(-)\n\n\nbase-commit: ef8ce8f3d4344fd3af049c17eeba5cd20d98b69f\n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505188","messageId":"ad9ee00a2a971522968f95dd413deae24839ef71.1729017728.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729017728.git.code@khaugsbakk.name","subject":"[PATCH 1/6] doc: update-ref: drop “flag”","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-15T19:03:10Z","receivedAt":"2024-10-15T19:05:05Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nThe other paragraphs on options say `With <option>,`.  Let’s be uniform.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/git-update-ref.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex afcf33cf608..fe5967234e9 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -55,7 +55,7 @@ for reading but not for writing (so we'll never write through a\n ref symlink to some other tree, if you have copied a whole\n archive by creating a symlink tree).\n \n-With `-d` flag, it deletes the named <ref> after verifying it\n+With `-d`, it deletes the named <ref> after verifying it\n still contains <old-oid>.\n \n With `--stdin`, update-ref reads instructions from standard input and\n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505189","messageId":"c4bc0553a30ac16bd242edf387280eea37aa3a07.1729017728.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729017728.git.code@khaugsbakk.name","subject":"[PATCH 2/6] doc: update-ref: remove safety paragraphs","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-15T19:03:11Z","receivedAt":"2024-10-15T19:05:10Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nRemove paragraphs which explain that using this command is safer than\nechoing the branch name into `HEAD`.\n\nThese paragraphs have been part of the documentation since the\ndocumentation was created in 129056370ab (Add missing documentation.,\n2005-10-04), back when the command synopsis was a lot simpler:\n\n    `git-update-ref` <ref> <newvalue> [<oldvalue>]\n\nThese paragraphs don’t interrupt the flow of the document on that\nrevision since it is at the end.  Now though it is placed after the\ndescription of `--no-deref` and before `-d` and `--stdin`.  Covering all\nthe options is more generally interesting than a safety note about a\nnaïve `HEAD` management.\n\nSuch a safety warning is also much less relevant now, considering that\neveryone who isn’t intentionally poking at the internal implementation\nis using porcelain commands to manage `HEAD`.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/git-update-ref.txt | 15 ---------------\n 1 file changed, 15 deletions(-)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex fe5967234e9..ec268b1426d 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -40,21 +40,6 @@ somewhere else with a regular filename).\n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\n \n-In general, using\n-\n-\tgit update-ref HEAD \"$head\"\n-\n-should be a _lot_ safer than doing\n-\n-\techo \"$head\" > \"$GIT_DIR/HEAD\"\n-\n-both from a symlink following standpoint *and* an error checking\n-standpoint.  The \"refs/\" rule for symlinks means that symlinks\n-that point to \"outside\" the tree are safe: they'll be followed\n-for reading but not for writing (so we'll never write through a\n-ref symlink to some other tree, if you have copied a whole\n-archive by creating a symlink tree).\n-\n With `-d`, it deletes the named <ref> after verifying it\n still contains <old-oid>.\n \n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505190","messageId":"3f43ddfed24e89ab9931b83e549f0eb8bc829928.1729017728.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729017728.git.code@khaugsbakk.name","subject":"[PATCH 3/6] doc: update-ref: demote symlink to last section","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-15T19:03:12Z","receivedAt":"2024-10-15T19:05:13Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nMove the discussion of file system symbolic links to a new “Notes”\nsection (inspired by the one in git-symbolic-ref(1)) since this is\nmostly of historical note at this point, not something that is needed in\nthe main section of the documentation.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/git-update-ref.txt | 19 +++++++++++--------\n 1 file changed, 11 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex ec268b1426d..c03e65404e8 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -29,14 +29,6 @@ It also allows a \"ref\" file to be a symbolic pointer to another\n ref file by starting with the four-byte header sequence of\n \"ref:\".\n \n-More importantly, it allows the update of a ref file to follow\n-these symbolic pointers, whether they are symlinks or these\n-\"regular file symbolic refs\".  It follows *real* symlinks only\n-if they start with \"refs/\": otherwise it will just try to read\n-them and update them as a regular file (i.e. it will allow the\n-filesystem to follow them, but will overwrite such a symlink to\n-somewhere else with a regular filename).\n-\n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\n \n@@ -185,6 +177,17 @@ An update will fail (without changing <ref>) if the current user is\n unable to create a new log file, append to the existing log file\n or does not have committer information available.\n \n+NOTES\n+-----\n+\n+Symbolic refs were initially implemented using symbolic links.  This is\n+now deprecated since not all filesystems support symbolic links.\n+\n+This command follows *real* symlinks only if they start with \"refs/\":\n+otherwise it will just try to read them and update them as a regular\n+file (i.e. it will allow the filesystem to follow them, but will\n+overwrite such a symlink to somewhere else with a regular filename).\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505191","messageId":"dec48e2d37cc4edafb51476284ce3fece4718ce7.1729017728.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729017728.git.code@khaugsbakk.name","subject":"[PATCH 4/6] doc: update-ref: remove confusing paragraph","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-15T19:03:13Z","receivedAt":"2024-10-15T19:05:16Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nThis paragraph interrupts the flow of this section by going into detail\nabout what a symbolic ref file is and how it is implemented.  It is not\nclear what the purpose is since symbolic refs were already mentioned\nprior (“possibly dereferencing the symbolic refs”).  Worse, it can\nconfuse the reader about what argument can be a symbolic ref since it\njust says “it” and not which of the parameters; in turn the reader can\nbe lead to try `<new-oid>` and then get a confusing error since\nupdate-ref will just say that it is not a valid SHA1.\n\nReported-by: Bence Ferdinandy <bence@ferdinandy.com>\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n\nNotes (series):\n    This paragraph is also from the initial documentation: 129056370ab (Add\n    missing documentation., 2005-10-04).\n\n Documentation/git-update-ref.txt | 4 ----\n 1 file changed, 4 deletions(-)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex c03e65404e8..4bb3389cc7c 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -25,10 +25,6 @@ value is <old-oid>.  You can specify 40 \"0\" or an empty string\n as <old-oid> to make sure that the ref you are creating does\n not exist.\n \n-It also allows a \"ref\" file to be a symbolic pointer to another\n-ref file by starting with the four-byte header sequence of\n-\"ref:\".\n-\n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\n \n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505192","messageId":"3575fb48c932f50b2a3f6fb0e582b3c2a9b087af.1729017728.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729017728.git.code@khaugsbakk.name","subject":"[PATCH 5/6] doc: update-ref: discuss symbolic links","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-15T19:03:14Z","receivedAt":"2024-10-15T19:05:20Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nAdd a paragraph which just emphasizes that the command without any\noptions does not support refs in the final arguments.  This is\nclear already from the names `<new-oid>` and `<old-oid>` but the right\nbalance of redundancy makes documentation robust to stray\ninterpretation.\n\nThis is also a good place to mention why `--stdin` has those `symref-*`\ncommands.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/git-update-ref.txt | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex 4bb3389cc7c..623c4d860eb 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -25,6 +25,12 @@ value is <old-oid>.  You can specify 40 \"0\" or an empty string\n as <old-oid> to make sure that the ref you are creating does\n not exist.\n \n+The final arguments are object names; this command without any options\n+does not support updating a symbolic ref to point to another ref (see\n+linkgit:git-symbolic-ref[1]).  But `git update-ref --stdin` does have\n+the the `symref-*` commands so that regular refs and symbolic refs can\n+be committed in the same transaction.\n+\n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\n \n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505193","messageId":"9e775a65eb3ff49ded231aeeeddd59ccdce3c8a8.1729017728.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729017728.git.code@khaugsbakk.name","subject":"[PATCH 6/6] doc: mutually link update-ref and symbolic-ref","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-15T19:03:15Z","receivedAt":"2024-10-15T19:05:23Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nThese two commands are similar enough to acknowledge each other on their\ndocumentation pages.\n\nSee the previous commit where we discussed that option-less update-ref\ndoes not support updating symbolic refs but symbolic-ref does.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/git-symbolic-ref.txt | 4 ++++\n Documentation/git-update-ref.txt   | 4 ++++\n 2 files changed, 8 insertions(+)\n\ndiff --git a/Documentation/git-symbolic-ref.txt b/Documentation/git-symbolic-ref.txt\nindex 761b154bcbb..33ca381fde0 100644\n--- a/Documentation/git-symbolic-ref.txt\n+++ b/Documentation/git-symbolic-ref.txt\n@@ -73,6 +73,10 @@ default.\n symbolic ref were printed correctly, with status 1 if the requested\n name is not a symbolic ref, or 128 if another error occurs.\n \n+SEE ALSO\n+--------\n+linkgit:git-update-ref[1]\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex 623c4d860eb..fada3f670eb 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -190,6 +190,10 @@ otherwise it will just try to read them and update them as a regular\n file (i.e. it will allow the filesystem to follow them, but will\n overwrite such a symlink to somewhere else with a regular filename).\n \n+SEE ALSO\n+--------\n+linkgit:git-symbolic-ref[1]\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505196","messageId":"8e644cf2-f903-4089-960c-2fe7eff30834@app.fastmail.com","threadId":"62319","inReplyTo":"3575fb48c932f50b2a3f6fb0e582b3c2a9b087af.1729017728.git.code@khaugsbakk.name","subject":"Re: [PATCH 5/6] doc: update-ref: discuss symbolic links","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-15T19:08:29Z","receivedAt":"2024-10-15T19:08:50Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Tue, Oct 15, 2024, at 21:03, kristofferhaugsbakk@fastmail.com wrote:\n> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nTsk. Subject should have been “discuss symbolic refs”.\n\n-- \n  Kristoffer Haugsbakk\n  kristofferhaugsbakk@fastmail.com\n\n"},{"id":"505255","messageId":"D4X3P9IU599M.1ENMB903CT197@ferdinandy.com","threadId":"62319","inReplyTo":"cover.1729017728.git.code@khaugsbakk.name","subject":"Re: [PATCH 0/6] doc: update-ref: amend old material and discuss symrefs","fromName":"Bence Ferdinandy","fromEmail":"bence@ferdinandy.com","sentAt":"2024-10-16T08:51:45Z","receivedAt":"2024-10-16T08:52:08Z","isPatch":true,"sender":{"key":"bence@ferdinandy.com","avatar":"https://avatars.githubusercontent.com/u/6343487?v=4"},"body":"\nOn Tue Oct 15, 2024 at 21:03,  <kristofferhaugsbakk@fastmail.com> wrote:\n> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>\n> (See the previous email for the context)\n>\n> This series removes or moves some old material in the update-ref doc and\n> improves the discussion of symrefs, opting for a high-level description\n> with some redundancy (see patch 5/6) in order to avoid a reported\n> mistake/confusion.\n>\n> The end goal (after all patches are applied):\n>\n> • First paragraph (in Description) describes the first form\n> • Second paragraph the second form\n> • Third paragraph mentions symrefs and explains why `--stdin` supports\n>   them\n> • A new section whither the symlink (FS) vs. symrefs (`ref: ` files… or\n>   strings nowadays with the different formats that refs can have?)\n>   discussion is moved\n> • Link update-ref to symbolic-ref and vice versa\n\nThanks, it seems much more clear to me this way!\n\nReviewed-by: Bence Ferdinandy <bence@ferdinandy.com>\n\n"},{"id":"505298","messageId":"ZxAmBsZzwBuEGN3N@nand.local","threadId":"62319","inReplyTo":"ad9ee00a2a971522968f95dd413deae24839ef71.1729017728.git.code@khaugsbakk.name","subject":"Re: [PATCH 1/6] doc: update-ref: drop “flag”","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-10-16T20:45:58Z","receivedAt":"2024-10-16T20:46:02Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Tue, Oct 15, 2024 at 09:03:10PM +0200, kristofferhaugsbakk@fastmail.com wrote:\n> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>\n> The other paragraphs on options say `With <option>,`.  Let’s be uniform.\n>\n> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n> ---\n>  Documentation/git-update-ref.txt | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\n> index afcf33cf608..fe5967234e9 100644\n> --- a/Documentation/git-update-ref.txt\n> +++ b/Documentation/git-update-ref.txt\n> @@ -55,7 +55,7 @@ for reading but not for writing (so we'll never write through a\n>  ref symlink to some other tree, if you have copied a whole\n>  archive by creating a symlink tree).\n>\n> -With `-d` flag, it deletes the named <ref> after verifying it\n> +With `-d`, it deletes the named <ref> after verifying it\n>  still contains <old-oid>.\n\nIt looks like we may want to re-wrap this paragraph after tweaking the\nwording on the first line.\n\nThanks,\nTaylor\n"},{"id":"505299","messageId":"ZxAmWKkjxJDu+121@nand.local","threadId":"62319","inReplyTo":"c4bc0553a30ac16bd242edf387280eea37aa3a07.1729017728.git.code@khaugsbakk.name","subject":"Re: [PATCH 2/6] doc: update-ref: remove safety paragraphs","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-10-16T20:47:20Z","receivedAt":"2024-10-16T20:47:24Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Tue, Oct 15, 2024 at 09:03:11PM +0200, kristofferhaugsbakk@fastmail.com wrote:\n> Such a safety warning is also much less relevant now, considering that\n> everyone who isn’t intentionally poking at the internal implementation\n> is using porcelain commands to manage `HEAD`.\n\nMakes sense. Thanks for carefully explaining your reasoning here.\n\nThanks,\nTaylor\n"},{"id":"505300","messageId":"ZxAnO5zH1vtgRvLk@nand.local","threadId":"62319","inReplyTo":"dec48e2d37cc4edafb51476284ce3fece4718ce7.1729017728.git.code@khaugsbakk.name","subject":"Re: [PATCH 4/6] doc: update-ref: remove confusing paragraph","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-10-16T20:51:07Z","receivedAt":"2024-10-16T20:51:11Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Tue, Oct 15, 2024 at 09:03:13PM +0200, kristofferhaugsbakk@fastmail.com wrote:\n> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>\n> This paragraph interrupts the flow of this section by going into detail\n> about what a symbolic ref file is and how it is implemented.  It is not\n> clear what the purpose is since symbolic refs were already mentioned\n> prior (“possibly dereferencing the symbolic refs”).  Worse, it can\n> confuse the reader about what argument can be a symbolic ref since it\n> just says “it” and not which of the parameters; in turn the reader can\n> be lead to try `<new-oid>` and then get a confusing error since\n> update-ref will just say that it is not a valid SHA1.\n\nI think that it is worth saying that this concept is explained well\nthroughout other parts of the documentation, including other parts of\n'git-update-ref(1)', as well as the glossary content.\n\nI don't think that you necessarily need to mention that here. But at\nleast I was initially confused thinking that this patch proposed\nremoving the only mention of the special \"ref:\" syntax for symbolic\nreferences.\n\nBut it does not, so I think that this patch as you wrote it is good.\nLet's keep reading...\n\nThanks,\nTaylor\n"},{"id":"505301","messageId":"ZxAndtRZ7oOHndU6@nand.local","threadId":"62319","inReplyTo":"8e644cf2-f903-4089-960c-2fe7eff30834@app.fastmail.com","subject":"Re: [PATCH 5/6] doc: update-ref: discuss symbolic links","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-10-16T20:52:06Z","receivedAt":"2024-10-16T20:52:10Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Tue, Oct 15, 2024 at 09:08:29PM +0200, Kristoffer Haugsbakk wrote:\n> On Tue, Oct 15, 2024, at 21:03, kristofferhaugsbakk@fastmail.com wrote:\n> > From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>\n> Tsk. Subject should have been “discuss symbolic refs”.\n\nAgreed.\n\nThanks,\nTaylor\n"},{"id":"505302","messageId":"ZxAoFUDmdfZ8rlLs@nand.local","threadId":"62319","inReplyTo":"cover.1729017728.git.code@khaugsbakk.name","subject":"Re: [PATCH 0/6] doc: update-ref: amend old material and discuss symrefs","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-10-16T20:54:45Z","receivedAt":"2024-10-16T20:54:48Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Tue, Oct 15, 2024 at 09:03:09PM +0200, kristofferhaugsbakk@fastmail.com wrote:\n> Kristoffer Haugsbakk (6):\n>   doc: update-ref: drop “flag”\n>   doc: update-ref: remove safety paragraphs\n>   doc: update-ref: demote symlink to last section\n>   doc: update-ref: remove confusing paragraph\n>   doc: update-ref: discuss symbolic links\n>   doc: mutually link update-ref and symbolic-ref\n>\n>  Documentation/git-symbolic-ref.txt |  4 +++\n>  Documentation/git-update-ref.txt   | 48 +++++++++++++-----------------\n>  2 files changed, 25 insertions(+), 27 deletions(-)\n\nThanks for working on this. These changes generally looked good to me\n(although seeing smart-quotes in the commit messages was a little\nsurprising ;-)).\n\nI'm making a note for the next WC report to expect a new round that\ncorrects the subject line of the penultimate patch \"doc: update-ref:\ndiscuss symbolic links\".\n\nAs a general note, prefixing commits with \"doc: update-ref: \" is a\nlittle strange to me. I think I might have instead written:\n\n    Documentation/git-update-ref.txt: remove safety paragraphs\n\n, and so on. I left a couple of other small notes, but I don't think any\nof them are urgent to address, though it would be nice.\n\nThanks for working on this and improving Git's documentation.\n\nThanks,\nTaylor\n"},{"id":"505303","messageId":"3af2273a-891d-4179-96c3-865b0e64bf08@app.fastmail.com","threadId":"62319","inReplyTo":"ZxAnO5zH1vtgRvLk@nand.local","subject":"Re: [PATCH 4/6] doc: update-ref: remove confusing paragraph","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-16T20:55:13Z","receivedAt":"2024-10-16T20:55:36Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Wed, Oct 16, 2024, at 22:51, Taylor Blau wrote:\n> […]\n>\n> I think that it is worth saying that this concept is explained well\n> throughout other parts of the documentation, including other parts of\n> 'git-update-ref(1)', as well as the glossary content.\n>\n> I don't think that you necessarily need to mention that here. But at\n> least I was initially confused thinking that this patch proposed\n> removing the only mention of the special \"ref:\" syntax for symbolic\n> references.\n>\n> But it does not, so I think that this patch as you wrote it is good.\n> Let's keep reading...\n\nYou/a reader in general being in doubt is enough reason to mention some\nother documentation source.  I’ll fix in the next version.\n\nAnd thanks for reading!\n"},{"id":"505305","messageId":"ZxAow+zX72sSx4EX@nand.local","threadId":"62319","inReplyTo":"3af2273a-891d-4179-96c3-865b0e64bf08@app.fastmail.com","subject":"Re: [PATCH 4/6] doc: update-ref: remove confusing paragraph","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-10-16T20:57:39Z","receivedAt":"2024-10-16T20:57:43Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Wed, Oct 16, 2024 at 10:55:13PM +0200, Kristoffer Haugsbakk wrote:\n> On Wed, Oct 16, 2024, at 22:51, Taylor Blau wrote:\n> > […]\n> >\n> > I think that it is worth saying that this concept is explained well\n> > throughout other parts of the documentation, including other parts of\n> > 'git-update-ref(1)', as well as the glossary content.\n> >\n> > I don't think that you necessarily need to mention that here. But at\n> > least I was initially confused thinking that this patch proposed\n> > removing the only mention of the special \"ref:\" syntax for symbolic\n> > references.\n> >\n> > But it does not, so I think that this patch as you wrote it is good.\n> > Let's keep reading...\n>\n> You/a reader in general being in doubt is enough reason to mention some\n> other documentation source.  I’ll fix in the next version.\n>\n> And thanks for reading!\n\nThank you, and no problem ;-).\n\nThanks,\nTaylor\n"},{"id":"505307","messageId":"9b8925d3-3f2b-4396-a0b0-3b72bba5e53b@app.fastmail.com","threadId":"62319","inReplyTo":"ZxAoFUDmdfZ8rlLs@nand.local","subject":"Re: [PATCH 0/6] doc: update-ref: amend old material and discuss symrefs","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-16T21:00:30Z","receivedAt":"2024-10-16T21:00:52Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Wed, Oct 16, 2024, at 22:54, Taylor Blau wrote:\n> Thanks for working on this. These changes generally looked good to me\n> (although seeing smart-quotes in the commit messages was a little\n> surprising ;-)).\n>\n> I'm making a note for the next WC report to expect a new round that\n> corrects the subject line of the penultimate patch \"doc: update-ref:\n> discuss symbolic links\".\n>\n> As a general note, prefixing commits with \"doc: update-ref: \" is a\n> little strange to me. I think I might have instead written:\n>\n>     Documentation/git-update-ref.txt: remove safety paragraphs\n>\n> , and so on. I left a couple of other small notes, but I don't think any\n> of them are urgent to address, though it would be nice.\n>\n> Thanks for working on this and improving Git's documentation.\n>\n> Thanks,\n> Taylor\n\nThanks for the review overview.  I’ll change the subjects/area parts in\nthe next round.\n\nI looked through the commit subjects for `Documentation` in the past\nand, seeing several different styles, landed on one of the shorter ones.\nAccording to my recollection.\n\n-- \nKristoffer Haugsbakk\n\n"},{"id":"505316","messageId":"CAPig+cSuQwu4YeZ5cs-g0oAnhCf1LMS1SSywyPc_vBExh85ahw@mail.gmail.com","threadId":"62319","inReplyTo":"ZxAmBsZzwBuEGN3N@nand.local","subject":"Re: [PATCH 1/6] doc: update-ref: drop “flag”","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-10-16T22:08:05Z","receivedAt":"2024-10-16T22:08:17Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Oct 16, 2024 at 4:46 PM Taylor Blau <me@ttaylorr.com> wrote:\n> On Tue, Oct 15, 2024 at 09:03:10PM +0200, kristofferhaugsbakk@fastmail.com wrote:\n> > -With `-d` flag, it deletes the named <ref> after verifying it\n> > +With `-d`, it deletes the named <ref> after verifying it\n> >  still contains <old-oid>.\n>\n> It looks like we may want to re-wrap this paragraph after tweaking the\n> wording on the first line.\n\nI think we typically avoid rewrapping after minor edits like this\nsince rewrapping introduces unnecessary noise which makes it more\ndifficult for reviewers to identify the important (actual) change.\n"},{"id":"505317","messageId":"ZxA5ni7McD1c1yuf@nand.local","threadId":"62319","inReplyTo":"CAPig+cSuQwu4YeZ5cs-g0oAnhCf1LMS1SSywyPc_vBExh85ahw@mail.gmail.com","subject":"Re: [PATCH 1/6] doc: update-ref: drop “flag”","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-10-16T22:09:34Z","receivedAt":"2024-10-16T22:09:38Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Wed, Oct 16, 2024 at 06:08:05PM -0400, Eric Sunshine wrote:\n> On Wed, Oct 16, 2024 at 4:46 PM Taylor Blau <me@ttaylorr.com> wrote:\n> > On Tue, Oct 15, 2024 at 09:03:10PM +0200, kristofferhaugsbakk@fastmail.com wrote:\n> > > -With `-d` flag, it deletes the named <ref> after verifying it\n> > > +With `-d`, it deletes the named <ref> after verifying it\n> > >  still contains <old-oid>.\n> >\n> > It looks like we may want to re-wrap this paragraph after tweaking the\n> > wording on the first line.\n>\n> I think we typically avoid rewrapping after minor edits like this\n> since rewrapping introduces unnecessary noise which makes it more\n> difficult for reviewers to identify the important (actual) change.\n\nI have done it in the past myself, since I often find the result of\nre-wrapping much nicer to read. But I see what you are saying, and\ncertainly don't feel strongly.\n\nThanks,\nTaylor\n"},{"id":"505375","messageId":"24297144-c08f-4bc4-89dc-c3d8c12523de@app.fastmail.com","threadId":"62319","inReplyTo":"ZxA5ni7McD1c1yuf@nand.local","subject":"Re: [PATCH 1/6] doc: update-ref: drop “flag”","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-17T15:30:27Z","receivedAt":"2024-10-17T15:30:50Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Thu, Oct 17, 2024, at 00:09, Taylor Blau wrote:\n> On Wed, Oct 16, 2024 at 06:08:05PM -0400, Eric Sunshine wrote:\n>> On Wed, Oct 16, 2024 at 4:46 PM Taylor Blau <me@ttaylorr.com> wrote:\n>> > On Tue, Oct 15, 2024 at 09:03:10PM +0200, kristofferhaugsbakk@fastmail.com wrote:\n>> > > -With `-d` flag, it deletes the named <ref> after verifying it\n>> > > +With `-d`, it deletes the named <ref> after verifying it\n>> > >  still contains <old-oid>.\n>> >\n>> > It looks like we may want to re-wrap this paragraph after tweaking the\n>> > wording on the first line.\n>>\n>> I think we typically avoid rewrapping after minor edits like this\n>> since rewrapping introduces unnecessary noise which makes it more\n>> difficult for reviewers to identify the important (actual) change.\n\nI was skeptical at first.  But I saw that this line is only 55\ncharacters long.  So I think (like Taylor) that rewrap is in order.\n\nWhat if I make a commit with just that word drop and then an immediate\nfixup! commit which wraps the paragraph?  That way the review is still\nstraightforward.  And hopefully the integration part is not complicated\nfurther.\n\n>\n> I have done it in the past myself, since I often find the result of\n> re-wrapping much nicer to read. But I see what you are saying, and\n> certainly don't feel strongly.\n>\n> Thanks,\n> Taylor\n\n-- \nKris\n\n"},{"id":"505377","messageId":"CAPig+cTPyFXYxm-YO7xTqmeL1KZKT0vApvaD633Y4=q8=k-2rQ@mail.gmail.com","threadId":"62319","inReplyTo":"24297144-c08f-4bc4-89dc-c3d8c12523de@app.fastmail.com","subject":"Re: [PATCH 1/6] doc: update-ref: drop “flag”","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-10-17T16:31:26Z","receivedAt":"2024-10-17T16:31:40Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Oct 17, 2024 at 11:30 AM Kristoffer Haugsbakk\n<kristofferhaugsbakk@fastmail.com> wrote:\n> On Thu, Oct 17, 2024, at 00:09, Taylor Blau wrote:\n> > On Wed, Oct 16, 2024 at 06:08:05PM -0400, Eric Sunshine wrote:\n> >> I think we typically avoid rewrapping after minor edits like this\n> >> since rewrapping introduces unnecessary noise which makes it more\n> >> difficult for reviewers to identify the important (actual) change.\n>\n> I was skeptical at first.  But I saw that this line is only 55\n> characters long.  So I think (like Taylor) that rewrap is in order.\n>\n> What if I make a commit with just that word drop and then an immediate\n> fixup! commit which wraps the paragraph?  That way the review is still\n> straightforward.  And hopefully the integration part is not complicated\n> further.\n\nDon't bother. That's even more work for yourself, for reviewers, and\nfor the integrator, and it increases the cognitive load for everyone.\n\nThere are far fewer reviewers than there are people submitting patches\nto this project, so it is helpful for submitters to do what they can\nto make life easier for reviewers, and foregoing re-wrapping of lines,\nin general, is one such way to do so. However, this is such a minor\nchange that it isn't going to matter one way or the other, especially\nif Taylor, as interim maintainer, is willing to accept the extra noise\ncaused by re-wrapping.\n"},{"id":"505385","messageId":"ZxFcWy7clKQyw1xq@nand.local","threadId":"62319","inReplyTo":"CAPig+cTPyFXYxm-YO7xTqmeL1KZKT0vApvaD633Y4=q8=k-2rQ@mail.gmail.com","subject":"Re: [PATCH 1/6] doc: update-ref: drop “flag”","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-10-17T18:50:03Z","receivedAt":"2024-10-17T18:50:06Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Thu, Oct 17, 2024 at 12:31:26PM -0400, Eric Sunshine wrote:\n> On Thu, Oct 17, 2024 at 11:30 AM Kristoffer Haugsbakk\n> <kristofferhaugsbakk@fastmail.com> wrote:\n> > On Thu, Oct 17, 2024, at 00:09, Taylor Blau wrote:\n> > > On Wed, Oct 16, 2024 at 06:08:05PM -0400, Eric Sunshine wrote:\n> > >> I think we typically avoid rewrapping after minor edits like this\n> > >> since rewrapping introduces unnecessary noise which makes it more\n> > >> difficult for reviewers to identify the important (actual) change.\n> >\n> > I was skeptical at first.  But I saw that this line is only 55\n> > characters long.  So I think (like Taylor) that rewrap is in order.\n> >\n> > What if I make a commit with just that word drop and then an immediate\n> > fixup! commit which wraps the paragraph?  That way the review is still\n> > straightforward.  And hopefully the integration part is not complicated\n> > further.\n>\n> Don't bother. That's even more work for yourself, for reviewers, and\n> for the integrator, and it increases the cognitive load for everyone.\n>\n> There are far fewer reviewers than there are people submitting patches\n> to this project, so it is helpful for submitters to do what they can\n> to make life easier for reviewers, and foregoing re-wrapping of lines,\n> in general, is one such way to do so. However, this is such a minor\n> change that it isn't going to matter one way or the other, especially\n> if Taylor, as interim maintainer, is willing to accept the extra noise\n> caused by re-wrapping.\n\nI agree with everything Eric wrote here. If you want to send a new round\nthat re-wraps the text, please do so in this patch (that is, make patch\n1/6 in your new round apply the changes from this version *and* rewrap\nthe containing paragraph). Please do not send fixup! patches or other\nsuch things.\n\nThanks,\nTaylor\n"},{"id":"505504","messageId":"cover.1729367469.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729017728.git.code@khaugsbakk.name","subject":"[PATCH v2 0/6] doc: update-ref: amend old material and discuss symrefs","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-19T19:59:17Z","receivedAt":"2024-10-19T20:00:11Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nThis series removes or moves some old material in the update-ref doc and\nimproves the discussion of symrefs, opting for a high-level description\nwith some redundancy (see patch 5/6) in order to avoid a reported\nmistake/confusion.\n\nThe end goal (after all patches are applied):\n\n• First paragraph (in Description) describes the first form\n• Second paragraph the second form\n• Third paragraph mentions symrefs and explains why `--stdin` supports\n  them\n• A new section whither the symlink (FS) vs. symrefs discussion is moved\n• Link update-ref to symbolic-ref and vice versa\n\n§ Changes in v2\n\nSee notes on the patches for all changes.  Some of the minor ones are\nomitted here.\n\n• Diff changes (see interdiff):\n  • Fix “the the”\n• All: Taylor suggested changing the “area” prefix\n  • (but I kept it on the series for consistency)\n  • Link: https://lore.kernel.org/git/ZxAoFUDmdfZ8rlLs@nand.local/\n• Patch “drop “flag” ”:\n  • Not done: Wrap paragraph\n• Patch “remove confusing paragraph”\n  • (Commit) Message tweak\n  • Mention that what a symref is (concretely) is documented elsewhere\n• Patch “discuss symbolic refs”:\n  • change subject from “symbolic links”\n  • Credit Bence\n\nKristoffer Haugsbakk (6):\n  Documentation/git-update-ref.txt: drop “flag”\n  Documentation/git-update-ref.txt: remove safety paragraphs\n  Documentation/git-update-ref.txt: demote symlink to last section\n  Documentation/git-update-ref.txt: remove confusing paragraph\n  Documentation/git-update-ref.txt: discuss symbolic refs\n  Documentation: mutually link update-ref and symbolic-ref\n\n Documentation/git-symbolic-ref.txt |  4 +++\n Documentation/git-update-ref.txt   | 48 +++++++++++++-----------------\n 2 files changed, 25 insertions(+), 27 deletions(-)\n\nInterdiff against v1:\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex fada3f670eb..c64d80f5a2d 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -28,8 +28,8 @@ not exist.\n The final arguments are object names; this command without any options\n does not support updating a symbolic ref to point to another ref (see\n linkgit:git-symbolic-ref[1]).  But `git update-ref --stdin` does have\n-the the `symref-*` commands so that regular refs and symbolic refs can\n-be committed in the same transaction.\n+the `symref-*` commands so that regular refs and symbolic refs can be\n+committed in the same transaction.\n \n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\nRange-diff against v1:\n1:  ad9ee00a2a9 ! 1:  91c1cae3209 doc: update-ref: drop “flag”\n    @@ Metadata\n     Author: Kristoffer Haugsbakk <code@khaugsbakk.name>\n     \n      ## Commit message ##\n    -    doc: update-ref: drop “flag”\n    +    Documentation/git-update-ref.txt: drop “flag”\n     \n    -    The other paragraphs on options say `With <option>,`.  Let’s be uniform.\n    +    The other paragraphs on options say “With <option>,”.  Let’s be uniform.\n     \n         Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n     \n    +\n    + ## Notes (series) ##\n    +    v2:\n    +    • Message: tweak\n    +    • Not done: paragraph wrapping.  I found something else in this\n    +      paragraph: missing “that”: “after verifying *that*”.  I will fix that\n    +      in an upcoming series since there were four other missing instances of\n    +      this word and I did not want to add another patch to this series.\n    +\n      ## Documentation/git-update-ref.txt ##\n     @@ Documentation/git-update-ref.txt: for reading but not for writing (so we'll never write through a\n      ref symlink to some other tree, if you have copied a whole\n2:  c4bc0553a30 ! 2:  71d1e6364a2 doc: update-ref: remove safety paragraphs\n    @@ Metadata\n     Author: Kristoffer Haugsbakk <code@khaugsbakk.name>\n     \n      ## Commit message ##\n    -    doc: update-ref: remove safety paragraphs\n    +    Documentation/git-update-ref.txt: remove safety paragraphs\n     \n         Remove paragraphs which explain that using this command is safer than\n         echoing the branch name into `HEAD`.\n3:  3f43ddfed24 ! 3:  ca786bff978 doc: update-ref: demote symlink to last section\n    @@ Metadata\n     Author: Kristoffer Haugsbakk <code@khaugsbakk.name>\n     \n      ## Commit message ##\n    -    doc: update-ref: demote symlink to last section\n    +    Documentation/git-update-ref.txt: demote symlink to last section\n     \n         Move the discussion of file system symbolic links to a new “Notes”\n         section (inspired by the one in git-symbolic-ref(1)) since this is\n4:  dec48e2d37c ! 4:  769fd20945d doc: update-ref: remove confusing paragraph\n    @@ Metadata\n     Author: Kristoffer Haugsbakk <code@khaugsbakk.name>\n     \n      ## Commit message ##\n    -    doc: update-ref: remove confusing paragraph\n    +    Documentation/git-update-ref.txt: remove confusing paragraph\n     \n    -    This paragraph interrupts the flow of this section by going into detail\n    +    This paragraph interrupts the flow of the section by going into detail\n         about what a symbolic ref file is and how it is implemented.  It is not\n         clear what the purpose is since symbolic refs were already mentioned\n         prior (“possibly dereferencing the symbolic refs”).  Worse, it can\n    @@ Commit message\n         be lead to try `<new-oid>` and then get a confusing error since\n         update-ref will just say that it is not a valid SHA1.\n     \n    +    gitglossary(7) already documents what a symref is, concretely, and quite\n    +    well at that.\n    +\n         Reported-by: Bence Ferdinandy <bence@ferdinandy.com>\n         Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n     \n     \n      ## Notes (series) ##\n    -    This paragraph is also from the initial documentation: 129056370ab (Add\n    -    missing documentation., 2005-10-04).\n    +    v2:\n    +    • Message: replace “this” with “the”, which avoids two “this” close to\n    +      each other\n    +    • Message: Mention that what a symref is (concretely) is covered\n    +      by gitglossary(7)\n     \n      ## Documentation/git-update-ref.txt ##\n     @@ Documentation/git-update-ref.txt: value is <old-oid>.  You can specify 40 \"0\" or an empty string\n5:  3575fb48c93 ! 5:  ca5ece5336c doc: update-ref: discuss symbolic links\n    @@ Metadata\n     Author: Kristoffer Haugsbakk <code@khaugsbakk.name>\n     \n      ## Commit message ##\n    -    doc: update-ref: discuss symbolic links\n    +    Documentation/git-update-ref.txt: discuss symbolic refs\n     \n         Add a paragraph which just emphasizes that the command without any\n    -    options does not support refs in the final arguments.  This is\n    -    clear already from the names `<new-oid>` and `<old-oid>` but the right\n    -    balance of redundancy makes documentation robust to stray\n    -    interpretation.\n    +    options does not support refs in the final arguments.  This is clear\n    +    already from the names `<new-oid>` and `<old-oid>` but the right balance\n    +    of redundancy makes documentation robust against stray interpretation.\n     \n         This is also a good place to mention why `--stdin` has those `symref-*`\n         commands.\n     \n    +    Suggested-by: Bence Ferdinandy <bence@ferdinandy.com>\n         Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n     \n    +\n    + ## Notes (series) ##\n    +    v2:\n    +    • Message: grammar: “robust against”\n    +    • Message: Apparently the first paragraph wasn’t wrapped properly\n    +    • Fix “the the”\n    +    • Credit Bence for this suggestion which I forgot to do in v1\n    +\n    +      Link: https://lore.kernel.org/git/D4U30MD29CJT.3US5SBR598DVY@ferdinandy.com/\n    +    • Message: “symbolic refs”, not links\n    +\n      ## Documentation/git-update-ref.txt ##\n     @@ Documentation/git-update-ref.txt: value is <old-oid>.  You can specify 40 \"0\" or an empty string\n      as <old-oid> to make sure that the ref you are creating does\n    @@ Documentation/git-update-ref.txt: value is <old-oid>.  You can specify 40 \"0\" or\n     +The final arguments are object names; this command without any options\n     +does not support updating a symbolic ref to point to another ref (see\n     +linkgit:git-symbolic-ref[1]).  But `git update-ref --stdin` does have\n    -+the the `symref-*` commands so that regular refs and symbolic refs can\n    -+be committed in the same transaction.\n    ++the `symref-*` commands so that regular refs and symbolic refs can be\n    ++committed in the same transaction.\n     +\n      If --no-deref is given, <ref> itself is overwritten, rather than\n      the result of following the symbolic pointers.\n6:  9e775a65eb3 ! 6:  fd3c7585a0f doc: mutually link update-ref and symbolic-ref\n    @@ Metadata\n     Author: Kristoffer Haugsbakk <code@khaugsbakk.name>\n     \n      ## Commit message ##\n    -    doc: mutually link update-ref and symbolic-ref\n    +    Documentation: mutually link update-ref and symbolic-ref\n     \n         These two commands are similar enough to acknowledge each other on their\n         documentation pages.\n\nbase-commit: ef8ce8f3d4344fd3af049c17eeba5cd20d98b69f\n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505505","messageId":"91c1cae32098e82033f9b20ead6d1bc8e315da22.1729367469.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729367469.git.code@khaugsbakk.name","subject":"[PATCH v2 1/6] Documentation/git-update-ref.txt: drop “flag”","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-19T19:59:18Z","receivedAt":"2024-10-19T20:00:15Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nThe other paragraphs on options say “With <option>,”.  Let’s be uniform.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n\nNotes (series):\n    v2:\n    • Message: tweak\n    • Not done: paragraph wrapping.  I found something else in this\n      paragraph: missing “that”: “after verifying *that*”.  I will fix that\n      in an upcoming series since there were four other missing instances of\n      this word and I did not want to add another patch to this series.\n\n Documentation/git-update-ref.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex afcf33cf608..fe5967234e9 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -55,7 +55,7 @@ for reading but not for writing (so we'll never write through a\n ref symlink to some other tree, if you have copied a whole\n archive by creating a symlink tree).\n \n-With `-d` flag, it deletes the named <ref> after verifying it\n+With `-d`, it deletes the named <ref> after verifying it\n still contains <old-oid>.\n \n With `--stdin`, update-ref reads instructions from standard input and\n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505506","messageId":"71d1e6364a21767a8d80c96a30282e6557fec426.1729367469.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729367469.git.code@khaugsbakk.name","subject":"[PATCH v2 2/6] Documentation/git-update-ref.txt: remove safety paragraphs","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-19T19:59:19Z","receivedAt":"2024-10-19T20:00:20Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nRemove paragraphs which explain that using this command is safer than\nechoing the branch name into `HEAD`.\n\nThese paragraphs have been part of the documentation since the\ndocumentation was created in 129056370ab (Add missing documentation.,\n2005-10-04), back when the command synopsis was a lot simpler:\n\n    `git-update-ref` <ref> <newvalue> [<oldvalue>]\n\nThese paragraphs don’t interrupt the flow of the document on that\nrevision since it is at the end.  Now though it is placed after the\ndescription of `--no-deref` and before `-d` and `--stdin`.  Covering all\nthe options is more generally interesting than a safety note about a\nnaïve `HEAD` management.\n\nSuch a safety warning is also much less relevant now, considering that\neveryone who isn’t intentionally poking at the internal implementation\nis using porcelain commands to manage `HEAD`.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/git-update-ref.txt | 15 ---------------\n 1 file changed, 15 deletions(-)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex fe5967234e9..ec268b1426d 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -40,21 +40,6 @@ somewhere else with a regular filename).\n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\n \n-In general, using\n-\n-\tgit update-ref HEAD \"$head\"\n-\n-should be a _lot_ safer than doing\n-\n-\techo \"$head\" > \"$GIT_DIR/HEAD\"\n-\n-both from a symlink following standpoint *and* an error checking\n-standpoint.  The \"refs/\" rule for symlinks means that symlinks\n-that point to \"outside\" the tree are safe: they'll be followed\n-for reading but not for writing (so we'll never write through a\n-ref symlink to some other tree, if you have copied a whole\n-archive by creating a symlink tree).\n-\n With `-d`, it deletes the named <ref> after verifying it\n still contains <old-oid>.\n \n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505507","messageId":"ca786bff9783d671d5e3c36ffa35ade6029eada5.1729367469.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729367469.git.code@khaugsbakk.name","subject":"[PATCH v2 3/6] Documentation/git-update-ref.txt: demote symlink to last section","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-19T19:59:20Z","receivedAt":"2024-10-19T20:00:24Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nMove the discussion of file system symbolic links to a new “Notes”\nsection (inspired by the one in git-symbolic-ref(1)) since this is\nmostly of historical note at this point, not something that is needed in\nthe main section of the documentation.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/git-update-ref.txt | 19 +++++++++++--------\n 1 file changed, 11 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex ec268b1426d..c03e65404e8 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -29,14 +29,6 @@ It also allows a \"ref\" file to be a symbolic pointer to another\n ref file by starting with the four-byte header sequence of\n \"ref:\".\n \n-More importantly, it allows the update of a ref file to follow\n-these symbolic pointers, whether they are symlinks or these\n-\"regular file symbolic refs\".  It follows *real* symlinks only\n-if they start with \"refs/\": otherwise it will just try to read\n-them and update them as a regular file (i.e. it will allow the\n-filesystem to follow them, but will overwrite such a symlink to\n-somewhere else with a regular filename).\n-\n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\n \n@@ -185,6 +177,17 @@ An update will fail (without changing <ref>) if the current user is\n unable to create a new log file, append to the existing log file\n or does not have committer information available.\n \n+NOTES\n+-----\n+\n+Symbolic refs were initially implemented using symbolic links.  This is\n+now deprecated since not all filesystems support symbolic links.\n+\n+This command follows *real* symlinks only if they start with \"refs/\":\n+otherwise it will just try to read them and update them as a regular\n+file (i.e. it will allow the filesystem to follow them, but will\n+overwrite such a symlink to somewhere else with a regular filename).\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505508","messageId":"769fd20945dad7ec60f1109525466d916afa97a8.1729367469.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729367469.git.code@khaugsbakk.name","subject":"[PATCH v2 4/6] Documentation/git-update-ref.txt: remove confusing paragraph","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-19T19:59:21Z","receivedAt":"2024-10-19T20:00:28Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nThis paragraph interrupts the flow of the section by going into detail\nabout what a symbolic ref file is and how it is implemented.  It is not\nclear what the purpose is since symbolic refs were already mentioned\nprior (“possibly dereferencing the symbolic refs”).  Worse, it can\nconfuse the reader about what argument can be a symbolic ref since it\njust says “it” and not which of the parameters; in turn the reader can\nbe lead to try `<new-oid>` and then get a confusing error since\nupdate-ref will just say that it is not a valid SHA1.\n\ngitglossary(7) already documents what a symref is, concretely, and quite\nwell at that.\n\nReported-by: Bence Ferdinandy <bence@ferdinandy.com>\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n\nNotes (series):\n    v2:\n    • Message: replace “this” with “the”, which avoids two “this” close to\n      each other\n    • Message: Mention that what a symref is (concretely) is covered\n      by gitglossary(7)\n\n Documentation/git-update-ref.txt | 4 ----\n 1 file changed, 4 deletions(-)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex c03e65404e8..4bb3389cc7c 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -25,10 +25,6 @@ value is <old-oid>.  You can specify 40 \"0\" or an empty string\n as <old-oid> to make sure that the ref you are creating does\n not exist.\n \n-It also allows a \"ref\" file to be a symbolic pointer to another\n-ref file by starting with the four-byte header sequence of\n-\"ref:\".\n-\n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\n \n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505509","messageId":"ca5ece5336c85a47339537577a4c9131f8938cdc.1729367469.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729367469.git.code@khaugsbakk.name","subject":"[PATCH v2 5/6] Documentation/git-update-ref.txt: discuss symbolic refs","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-19T19:59:22Z","receivedAt":"2024-10-19T20:00:32Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nAdd a paragraph which just emphasizes that the command without any\noptions does not support refs in the final arguments.  This is clear\nalready from the names `<new-oid>` and `<old-oid>` but the right balance\nof redundancy makes documentation robust against stray interpretation.\n\nThis is also a good place to mention why `--stdin` has those `symref-*`\ncommands.\n\nSuggested-by: Bence Ferdinandy <bence@ferdinandy.com>\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n\nNotes (series):\n    v2:\n    • Message: grammar: “robust against”\n    • Message: Apparently the first paragraph wasn’t wrapped properly\n    • Fix “the the”\n    • Credit Bence for this suggestion which I forgot to do in v1\n    \n      Link: https://lore.kernel.org/git/D4U30MD29CJT.3US5SBR598DVY@ferdinandy.com/\n    • Message: “symbolic refs”, not links\n\n Documentation/git-update-ref.txt | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex 4bb3389cc7c..5866b6f2d37 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -25,6 +25,12 @@ value is <old-oid>.  You can specify 40 \"0\" or an empty string\n as <old-oid> to make sure that the ref you are creating does\n not exist.\n \n+The final arguments are object names; this command without any options\n+does not support updating a symbolic ref to point to another ref (see\n+linkgit:git-symbolic-ref[1]).  But `git update-ref --stdin` does have\n+the `symref-*` commands so that regular refs and symbolic refs can be\n+committed in the same transaction.\n+\n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\n \n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505510","messageId":"fd3c7585a0f84b26debcc216b86dc09acb219799.1729367469.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729367469.git.code@khaugsbakk.name","subject":"[PATCH v2 6/6] Documentation: mutually link update-ref and symbolic-ref","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-19T19:59:23Z","receivedAt":"2024-10-19T20:00:36Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nThese two commands are similar enough to acknowledge each other on their\ndocumentation pages.\n\nSee the previous commit where we discussed that option-less update-ref\ndoes not support updating symbolic refs but symbolic-ref does.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/git-symbolic-ref.txt | 4 ++++\n Documentation/git-update-ref.txt   | 4 ++++\n 2 files changed, 8 insertions(+)\n\ndiff --git a/Documentation/git-symbolic-ref.txt b/Documentation/git-symbolic-ref.txt\nindex 761b154bcbb..33ca381fde0 100644\n--- a/Documentation/git-symbolic-ref.txt\n+++ b/Documentation/git-symbolic-ref.txt\n@@ -73,6 +73,10 @@ default.\n symbolic ref were printed correctly, with status 1 if the requested\n name is not a symbolic ref, or 128 if another error occurs.\n \n+SEE ALSO\n+--------\n+linkgit:git-update-ref[1]\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex 5866b6f2d37..c64d80f5a2d 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -190,6 +190,10 @@ otherwise it will just try to read them and update them as a regular\n file (i.e. it will allow the filesystem to follow them, but will\n overwrite such a symlink to somewhere else with a regular filename).\n \n+SEE ALSO\n+--------\n+linkgit:git-symbolic-ref[1]\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505532","messageId":"CAOLa=ZTJqcEOQm8Ns58t6DxEXYn2ws__HDRRAaAhsBkJJFLXmg@mail.gmail.com","threadId":"62319","inReplyTo":"91c1cae32098e82033f9b20ead6d1bc8e315da22.1729367469.git.code@khaugsbakk.name","subject":"Re: [PATCH v2 1/6] Documentation/git-update-ref.txt: drop “flag”","fromName":"karthik nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2024-10-20T11:09:30Z","receivedAt":"2024-10-20T11:09:32Z","isPatch":true,"sender":{"key":"karthik.188@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1786334?v=4"},"body":"kristofferhaugsbakk@fastmail.com writes:\n\n> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>\n> The other paragraphs on options say “With <option>,”.  Let’s be uniform.\n>\n> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n> ---\n>\n> Notes (series):\n>     v2:\n>     • Message: tweak\n>     • Not done: paragraph wrapping.  I found something else in this\n>       paragraph: missing “that”: “after verifying *that*”.  I will fix that\n>       in an upcoming series since there were four other missing instances of\n>       this word and I did not want to add another patch to this series.\n>\n>  Documentation/git-update-ref.txt | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\n> index afcf33cf608..fe5967234e9 100644\n> --- a/Documentation/git-update-ref.txt\n> +++ b/Documentation/git-update-ref.txt\n> @@ -55,7 +55,7 @@ for reading but not for writing (so we'll never write through a\n>  ref symlink to some other tree, if you have copied a whole\n>  archive by creating a symlink tree).\n>\n> -With `-d` flag, it deletes the named <ref> after verifying it\n> +With `-d`, it deletes the named <ref> after verifying it\n>  still contains <old-oid>.\n>\n\nSo you mean it would read nicer as s/verifying/verifying that/. Which\nmakes sense to me, I'd have preferred that this was fixed here and the\nothers in a follow up patch like you mentioned, but that's okay!\n\n>  With `--stdin`, update-ref reads instructions from standard input and\n> --\n> 2.46.1.641.g54e7913fcb6\n"},{"id":"505533","messageId":"CAOLa=ZRAGmgfSHjAx6-1q9qV-aJ_Ciw=RZ6kpygqbSO+yAUEeg@mail.gmail.com","threadId":"62319","inReplyTo":"71d1e6364a21767a8d80c96a30282e6557fec426.1729367469.git.code@khaugsbakk.name","subject":"Re: [PATCH v2 2/6] Documentation/git-update-ref.txt: remove safety paragraphs","fromName":"karthik nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2024-10-20T11:13:19Z","receivedAt":"2024-10-20T11:13:22Z","isPatch":true,"sender":{"key":"karthik.188@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1786334?v=4"},"body":"kristofferhaugsbakk@fastmail.com writes:\n\n> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>\n> Remove paragraphs which explain that using this command is safer than\n> echoing the branch name into `HEAD`.\n>\n> These paragraphs have been part of the documentation since the\n> documentation was created in 129056370ab (Add missing documentation.,\n> 2005-10-04), back when the command synopsis was a lot simpler:\n>\n>     `git-update-ref` <ref> <newvalue> [<oldvalue>]\n>\n> These paragraphs don’t interrupt the flow of the document on that\n> revision since it is at the end.  Now though it is placed after the\n> description of `--no-deref` and before `-d` and `--stdin`.  Covering all\n> the options is more generally interesting than a safety note about a\n> naïve `HEAD` management.\n>\n> Such a safety warning is also much less relevant now, considering that\n> everyone who isn’t intentionally poking at the internal implementation\n> is using porcelain commands to manage `HEAD`.\n>\n> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n> ---\n>  Documentation/git-update-ref.txt | 15 ---------------\n>  1 file changed, 15 deletions(-)\n>\n> diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\n> index fe5967234e9..ec268b1426d 100644\n> --- a/Documentation/git-update-ref.txt\n> +++ b/Documentation/git-update-ref.txt\n> @@ -40,21 +40,6 @@ somewhere else with a regular filename).\n>  If --no-deref is given, <ref> itself is overwritten, rather than\n>  the result of following the symbolic pointers.\n>\n> -In general, using\n> -\n> -\tgit update-ref HEAD \"$head\"\n> -\n> -should be a _lot_ safer than doing\n> -\n> -\techo \"$head\" > \"$GIT_DIR/HEAD\"\n> -\n> -both from a symlink following standpoint *and* an error checking\n> -standpoint.  The \"refs/\" rule for symlinks means that symlinks\n> -that point to \"outside\" the tree are safe: they'll be followed\n> -for reading but not for writing (so we'll never write through a\n> -ref symlink to some other tree, if you have copied a whole\n> -archive by creating a symlink tree).\n> -\n\nIn the new reftable backend, HEAD would simply exist as a placeholder.\nSo either we do as you did and remove this entirely or double down to\nsay that writing to HEAD directly is not supported. I don't have a\npreference here, so this looks good!\n"},{"id":"505534","messageId":"CAOLa=ZRAG82ZLZMWcHgF-==yhRENv1Kkg_LbrpWDbN1tL9S+yg@mail.gmail.com","threadId":"62319","inReplyTo":"cover.1729367469.git.code@khaugsbakk.name","subject":"Re: [PATCH v2 0/6] doc: update-ref: amend old material and discuss symrefs","fromName":"karthik nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2024-10-20T11:16:47Z","receivedAt":"2024-10-20T11:16:48Z","isPatch":true,"sender":{"key":"karthik.188@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1786334?v=4"},"body":"kristofferhaugsbakk@fastmail.com writes:\n\n> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>\n> This series removes or moves some old material in the update-ref doc and\n> improves the discussion of symrefs, opting for a high-level description\n> with some redundancy (see patch 5/6) in order to avoid a reported\n> mistake/confusion.\n>\n> The end goal (after all patches are applied):\n>\n> • First paragraph (in Description) describes the first form\n> • Second paragraph the second form\n> • Third paragraph mentions symrefs and explains why `--stdin` supports\n>   them\n> • A new section whither the symlink (FS) vs. symrefs discussion is moved\n> • Link update-ref to symbolic-ref and vice versa\n>\n\nThanks for working on this, I have gone through the patches, I think it\nis in a great state.\n\nKarthik\n\n[snip]\n"},{"id":"505537","messageId":"bcb0e2d8-ebee-4835-aa43-05107199ee62@app.fastmail.com","threadId":"62319","inReplyTo":"CAOLa=ZRAGmgfSHjAx6-1q9qV-aJ_Ciw=RZ6kpygqbSO+yAUEeg@mail.gmail.com","subject":"Re: [PATCH v2 2/6] Documentation/git-update-ref.txt: remove safety paragraphs","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-20T12:30:12Z","receivedAt":"2024-10-20T12:30:35Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Sun, Oct 20, 2024, at 13:13, karthik nayak wrote:\n>> […]\n>> These paragraphs don’t interrupt the flow of the document on that\n>> revision since it is at the end.  Now though it is placed after the\n>> description of `--no-deref` and before `-d` and `--stdin`.  Covering all\n>> the options is more generally interesting than a safety note about a\n>> naïve `HEAD` management.\n>>\n>> Such a safety warning is also much less relevant now, considering that\n>> everyone who isn’t intentionally poking at the internal implementation\n>> is using porcelain commands to manage `HEAD`.\n>> […]\n>\n> In the new reftable backend, HEAD would simply exist as a placeholder.\n> So either we do as you did and remove this entirely or double down to\n> say that writing to HEAD directly is not supported. I don't have a\n> preference here, so this looks good!\n\nGreat, thanks. :)\n\nHere’s an attempted rewrite of the final paragraph for the possible\nnext round:\n\n  “ [Besides,] Writing to `HEAD` with `echo` is not allowed under the\n    reftable implementation, so this part has become misleading.\n\nBut now it doesn’t make sense to write multiple paragraphs and then end\nwith the most important part.\n\nMaybe\n\n  “ Remove paragraphs which explain that using this command is safer than\n    echoing the branch name into `HEAD`.\n\n    Evoking the echo strategy is wrong now under the reftable backend since\n    such a file does not exist.  And these days people use porcelain\n    commands to manage `HEAD` unless they are intentionally poking at what\n    the ref files backend looks like.\n\n    Maybe this warning was relevant for the usage patterns when it was\n    added[1] but now it just takes up space.\n\n    † 1: 129056370ab (Add missing documentation., 2005-10-04)\n"},{"id":"505564","messageId":"cfa378cd-2724-4c7e-9a86-68f4859d2d65@app.fastmail.com","threadId":"62319","inReplyTo":"CAOLa=ZRAGmgfSHjAx6-1q9qV-aJ_Ciw=RZ6kpygqbSO+yAUEeg@mail.gmail.com","subject":"Re: [PATCH v2 2/6] Documentation/git-update-ref.txt: remove safety paragraphs","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-20T16:24:08Z","receivedAt":"2024-10-20T16:24:31Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Sun, Oct 20, 2024, at 13:13, karthik nayak wrote:\n> kristofferhaugsbakk@fastmail.com writes:\n>> […]\n>> Such a safety warning is also much less relevant now, considering that\n>> everyone who isn’t intentionally poking at the internal implementation\n>> is using porcelain commands to manage `HEAD`.\n>>\n>> […]\n>\n> In the new reftable backend, HEAD would simply exist as a placeholder.\n> So either we do as you did and remove this entirely or double down to\n> say that writing to HEAD directly is not supported. I don't have a\n> preference here, so this looks good!\n\nI see now that I misread you.  I thought you were talking about the\ncommit message.  But you’re talking about the doc text.\n\nI don’t think that this text needs to say that writing to `HEAD` is not\nsupported.  Now the doc has implied that writing to `HEAD` is an option\nsince 2005.  But I think that implication has been irrelevant for a long\ntime.  We’re far away from the time when people had to update `HEAD`\nmanually.\n\n-- \nKristoffer Haugsbakk\n\n"},{"id":"505751","messageId":"cover.1729543007.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729367469.git.code@khaugsbakk.name","subject":"[PATCH v3 0/6] doc: update-ref: amend old material and discuss symrefs","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-21T20:47:23Z","receivedAt":"2024-10-21T20:47:51Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nThis series removes or moves some old material in the update-ref doc and\nimproves the discussion of symrefs, opting for a high-level description\nwith some redundancy (see patch 5/6) in order to avoid a reported\nmistake/confusion.\n\nThe end goal (after all patches are applied):\n\n• First paragraph (in Description) describes the first form\n• Second paragraph the second form\n• Third paragraph mentions symrefs and explains why `--stdin` supports\n  them\n• A new section whither the symlink (FS) vs. symrefs discussion is moved\n• Link update-ref to symbolic-ref and vice versa\n\n§ Changes in v3\n\n• Diff changes (see interdiff):\n  • Add missing word “that”\n• Patch “remove confusing paragraph”\n  • Rewrite message to emphasize ref backends\n• Patch “drop “flag” ”:\n  • Add missing word “that”\n\nKristoffer Haugsbakk (6):\n  Documentation/git-update-ref.txt: drop “flag”\n  Documentation/git-update-ref.txt: remove safety paragraphs\n  Documentation/git-update-ref.txt: demote symlink to last section\n  Documentation/git-update-ref.txt: remove confusing paragraph\n  Documentation/git-update-ref.txt: discuss symbolic refs\n  Documentation: mutually link update-ref and symbolic-ref\n\n Documentation/git-symbolic-ref.txt |  4 +++\n Documentation/git-update-ref.txt   | 48 +++++++++++++-----------------\n 2 files changed, 25 insertions(+), 27 deletions(-)\n\nInterdiff against v2:\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex c64d80f5a2d..8a4281cde9f 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -34,7 +34,7 @@ committed in the same transaction.\n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\n \n-With `-d`, it deletes the named <ref> after verifying it\n+With `-d`, it deletes the named <ref> after verifying that it\n still contains <old-oid>.\n \n With `--stdin`, update-ref reads instructions from standard input and\nRange-diff against v2:\n1:  91c1cae3209 ! 1:  9c40351950f Documentation/git-update-ref.txt: drop “flag”\n    @@ Commit message\n     \n         The other paragraphs on options say “With <option>,”.  Let’s be uniform.\n     \n    +    Also add missing word “that”.\n    +\n         Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n     \n     \n      ## Notes (series) ##\n    +    v3:\n    +    • Also add missing “that”: “after verifying *that*”\n    +\n    +      Link: https://lore.kernel.org/git/CAOLa=ZTJqcEOQm8Ns58t6DxEXYn2ws__HDRRAaAhsBkJJFLXmg@mail.gmail.com/\n         v2:\n         • Message: tweak\n         • Not done: paragraph wrapping.  I found something else in this\n    @@ Documentation/git-update-ref.txt: for reading but not for writing (so we'll neve\n      archive by creating a symlink tree).\n      \n     -With `-d` flag, it deletes the named <ref> after verifying it\n    -+With `-d`, it deletes the named <ref> after verifying it\n    ++With `-d`, it deletes the named <ref> after verifying that it\n      still contains <old-oid>.\n      \n      With `--stdin`, update-ref reads instructions from standard input and\n2:  71d1e6364a2 ! 2:  bb14c427f81 Documentation/git-update-ref.txt: remove safety paragraphs\n    @@ Commit message\n         Remove paragraphs which explain that using this command is safer than\n         echoing the branch name into `HEAD`.\n     \n    -    These paragraphs have been part of the documentation since the\n    -    documentation was created in 129056370ab (Add missing documentation.,\n    -    2005-10-04), back when the command synopsis was a lot simpler:\n    +    Evoking the echo strategy is wrong now under the reftable backend since\n    +    this file does not exist.  And the ref file backend majority user base\n    +    use porcelain commands to manage `HEAD` unless they are intentionally\n    +    poking at the implementation.\n     \n    -        `git-update-ref` <ref> <newvalue> [<oldvalue>]\n    +    Maybe this warning was relevant for the usage patterns when it was\n    +    added[1] but now it just takes up space.\n     \n    -    These paragraphs don’t interrupt the flow of the document on that\n    -    revision since it is at the end.  Now though it is placed after the\n    -    description of `--no-deref` and before `-d` and `--stdin`.  Covering all\n    -    the options is more generally interesting than a safety note about a\n    -    naïve `HEAD` management.\n    -\n    -    Such a safety warning is also much less relevant now, considering that\n    -    everyone who isn’t intentionally poking at the internal implementation\n    -    is using porcelain commands to manage `HEAD`.\n    +    † 1: 129056370ab (Add missing documentation., 2005-10-04)\n     \n         Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n     \n    +\n    + ## Notes (series) ##\n    +    v3:\n    +    • Change commit message: ref backends\n    +\n    +      Link: https://lore.kernel.org/git/bcb0e2d8-ebee-4835-aa43-05107199ee62@app.fastmail.com/#t\n    +\n      ## Documentation/git-update-ref.txt ##\n     @@ Documentation/git-update-ref.txt: somewhere else with a regular filename).\n      If --no-deref is given, <ref> itself is overwritten, rather than\n    @@ Documentation/git-update-ref.txt: somewhere else with a regular filename).\n     -ref symlink to some other tree, if you have copied a whole\n     -archive by creating a symlink tree).\n     -\n    - With `-d`, it deletes the named <ref> after verifying it\n    + With `-d`, it deletes the named <ref> after verifying that it\n      still contains <old-oid>.\n      \n3:  ca786bff978 = 3:  6c8ff72c230 Documentation/git-update-ref.txt: demote symlink to last section\n4:  769fd20945d = 4:  f6a70b3f70a Documentation/git-update-ref.txt: remove confusing paragraph\n5:  ca5ece5336c = 5:  5033ec82586 Documentation/git-update-ref.txt: discuss symbolic refs\n6:  fd3c7585a0f = 6:  aa1ee4a8ee0 Documentation: mutually link update-ref and symbolic-ref\n\nbase-commit: ef8ce8f3d4344fd3af049c17eeba5cd20d98b69f\n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505752","messageId":"9c40351950fe8b8735965f538d6b2ae830fafb1c.1729543007.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729543007.git.code@khaugsbakk.name","subject":"[PATCH v3 1/6] Documentation/git-update-ref.txt: drop “flag”","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-21T20:47:24Z","receivedAt":"2024-10-21T20:47:55Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nThe other paragraphs on options say “With <option>,”.  Let’s be uniform.\n\nAlso add missing word “that”.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n\nNotes (series):\n    v3:\n    • Also add missing “that”: “after verifying *that*”\n    \n      Link: https://lore.kernel.org/git/CAOLa=ZTJqcEOQm8Ns58t6DxEXYn2ws__HDRRAaAhsBkJJFLXmg@mail.gmail.com/\n    v2:\n    • Message: tweak\n    • Not done: paragraph wrapping.  I found something else in this\n      paragraph: missing “that”: “after verifying *that*”.  I will fix that\n      in an upcoming series since there were four other missing instances of\n      this word and I did not want to add another patch to this series.\n\n Documentation/git-update-ref.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex afcf33cf608..a2bee2ea24a 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -55,7 +55,7 @@ for reading but not for writing (so we'll never write through a\n ref symlink to some other tree, if you have copied a whole\n archive by creating a symlink tree).\n \n-With `-d` flag, it deletes the named <ref> after verifying it\n+With `-d`, it deletes the named <ref> after verifying that it\n still contains <old-oid>.\n \n With `--stdin`, update-ref reads instructions from standard input and\n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505753","messageId":"bb14c427f81bbbdf6d6bb80e1bfd39e80f1d1c40.1729543007.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729543007.git.code@khaugsbakk.name","subject":"[PATCH v3 2/6] Documentation/git-update-ref.txt: remove safety paragraphs","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-21T20:47:25Z","receivedAt":"2024-10-21T20:47:59Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nRemove paragraphs which explain that using this command is safer than\nechoing the branch name into `HEAD`.\n\nEvoking the echo strategy is wrong now under the reftable backend since\nthis file does not exist.  And the ref file backend majority user base\nuse porcelain commands to manage `HEAD` unless they are intentionally\npoking at the implementation.\n\nMaybe this warning was relevant for the usage patterns when it was\nadded[1] but now it just takes up space.\n\n† 1: 129056370ab (Add missing documentation., 2005-10-04)\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n\nNotes (series):\n    v3:\n    • Change commit message: ref backends\n    \n      Link: https://lore.kernel.org/git/bcb0e2d8-ebee-4835-aa43-05107199ee62@app.fastmail.com/#t\n\n Documentation/git-update-ref.txt | 15 ---------------\n 1 file changed, 15 deletions(-)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex a2bee2ea24a..1a0aec041ea 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -40,21 +40,6 @@ somewhere else with a regular filename).\n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\n \n-In general, using\n-\n-\tgit update-ref HEAD \"$head\"\n-\n-should be a _lot_ safer than doing\n-\n-\techo \"$head\" > \"$GIT_DIR/HEAD\"\n-\n-both from a symlink following standpoint *and* an error checking\n-standpoint.  The \"refs/\" rule for symlinks means that symlinks\n-that point to \"outside\" the tree are safe: they'll be followed\n-for reading but not for writing (so we'll never write through a\n-ref symlink to some other tree, if you have copied a whole\n-archive by creating a symlink tree).\n-\n With `-d`, it deletes the named <ref> after verifying that it\n still contains <old-oid>.\n \n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505754","messageId":"6c8ff72c23052b3f592888a64566ba8c7c4a2ea6.1729543007.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729543007.git.code@khaugsbakk.name","subject":"[PATCH v3 3/6] Documentation/git-update-ref.txt: demote symlink to last section","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-21T20:47:26Z","receivedAt":"2024-10-21T20:48:04Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nMove the discussion of file system symbolic links to a new “Notes”\nsection (inspired by the one in git-symbolic-ref(1)) since this is\nmostly of historical note at this point, not something that is needed in\nthe main section of the documentation.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/git-update-ref.txt | 19 +++++++++++--------\n 1 file changed, 11 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex 1a0aec041ea..6aaa7339d71 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -29,14 +29,6 @@ It also allows a \"ref\" file to be a symbolic pointer to another\n ref file by starting with the four-byte header sequence of\n \"ref:\".\n \n-More importantly, it allows the update of a ref file to follow\n-these symbolic pointers, whether they are symlinks or these\n-\"regular file symbolic refs\".  It follows *real* symlinks only\n-if they start with \"refs/\": otherwise it will just try to read\n-them and update them as a regular file (i.e. it will allow the\n-filesystem to follow them, but will overwrite such a symlink to\n-somewhere else with a regular filename).\n-\n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\n \n@@ -185,6 +177,17 @@ An update will fail (without changing <ref>) if the current user is\n unable to create a new log file, append to the existing log file\n or does not have committer information available.\n \n+NOTES\n+-----\n+\n+Symbolic refs were initially implemented using symbolic links.  This is\n+now deprecated since not all filesystems support symbolic links.\n+\n+This command follows *real* symlinks only if they start with \"refs/\":\n+otherwise it will just try to read them and update them as a regular\n+file (i.e. it will allow the filesystem to follow them, but will\n+overwrite such a symlink to somewhere else with a regular filename).\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505755","messageId":"f6a70b3f70a8d92a40c2079961e1b060e891cf23.1729543007.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729543007.git.code@khaugsbakk.name","subject":"[PATCH v3 4/6] Documentation/git-update-ref.txt: remove confusing paragraph","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-21T20:47:27Z","receivedAt":"2024-10-21T20:48:08Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nThis paragraph interrupts the flow of the section by going into detail\nabout what a symbolic ref file is and how it is implemented.  It is not\nclear what the purpose is since symbolic refs were already mentioned\nprior (“possibly dereferencing the symbolic refs”).  Worse, it can\nconfuse the reader about what argument can be a symbolic ref since it\njust says “it” and not which of the parameters; in turn the reader can\nbe lead to try `<new-oid>` and then get a confusing error since\nupdate-ref will just say that it is not a valid SHA1.\n\ngitglossary(7) already documents what a symref is, concretely, and quite\nwell at that.\n\nReported-by: Bence Ferdinandy <bence@ferdinandy.com>\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n\nNotes (series):\n    v2:\n    • Message: replace “this” with “the”, which avoids two “this” close to\n      each other\n    • Message: Mention that what a symref is (concretely) is covered\n      by gitglossary(7)\n\n Documentation/git-update-ref.txt | 4 ----\n 1 file changed, 4 deletions(-)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex 6aaa7339d71..61647ee8413 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -25,10 +25,6 @@ value is <old-oid>.  You can specify 40 \"0\" or an empty string\n as <old-oid> to make sure that the ref you are creating does\n not exist.\n \n-It also allows a \"ref\" file to be a symbolic pointer to another\n-ref file by starting with the four-byte header sequence of\n-\"ref:\".\n-\n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\n \n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505756","messageId":"5033ec82586691065504e429d0c21464abee945a.1729543007.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729543007.git.code@khaugsbakk.name","subject":"[PATCH v3 5/6] Documentation/git-update-ref.txt: discuss symbolic refs","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-21T20:47:28Z","receivedAt":"2024-10-21T20:48:13Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nAdd a paragraph which just emphasizes that the command without any\noptions does not support refs in the final arguments.  This is clear\nalready from the names `<new-oid>` and `<old-oid>` but the right balance\nof redundancy makes documentation robust against stray interpretation.\n\nThis is also a good place to mention why `--stdin` has those `symref-*`\ncommands.\n\nSuggested-by: Bence Ferdinandy <bence@ferdinandy.com>\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n\nNotes (series):\n    v2:\n    • Message: grammar: “robust against”\n    • Message: Apparently the first paragraph wasn’t wrapped properly\n    • Fix “the the”\n    • Credit Bence for this suggestion which I forgot to do in v1\n    \n      Link: https://lore.kernel.org/git/D4U30MD29CJT.3US5SBR598DVY@ferdinandy.com/\n    • Message: “symbolic refs”, not links\n\n Documentation/git-update-ref.txt | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex 61647ee8413..2e85f7ce3ee 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -25,6 +25,12 @@ value is <old-oid>.  You can specify 40 \"0\" or an empty string\n as <old-oid> to make sure that the ref you are creating does\n not exist.\n \n+The final arguments are object names; this command without any options\n+does not support updating a symbolic ref to point to another ref (see\n+linkgit:git-symbolic-ref[1]).  But `git update-ref --stdin` does have\n+the `symref-*` commands so that regular refs and symbolic refs can be\n+committed in the same transaction.\n+\n If --no-deref is given, <ref> itself is overwritten, rather than\n the result of following the symbolic pointers.\n \n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505757","messageId":"aa1ee4a8ee08f623b2b85f68a141f188364243f4.1729543007.git.code@khaugsbakk.name","threadId":"62319","inReplyTo":"cover.1729543007.git.code@khaugsbakk.name","subject":"[PATCH v3 6/6] Documentation: mutually link update-ref and symbolic-ref","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-21T20:47:29Z","receivedAt":"2024-10-21T20:48:17Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nThese two commands are similar enough to acknowledge each other on their\ndocumentation pages.\n\nSee the previous commit where we discussed that option-less update-ref\ndoes not support updating symbolic refs but symbolic-ref does.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/git-symbolic-ref.txt | 4 ++++\n Documentation/git-update-ref.txt   | 4 ++++\n 2 files changed, 8 insertions(+)\n\ndiff --git a/Documentation/git-symbolic-ref.txt b/Documentation/git-symbolic-ref.txt\nindex 761b154bcbb..33ca381fde0 100644\n--- a/Documentation/git-symbolic-ref.txt\n+++ b/Documentation/git-symbolic-ref.txt\n@@ -73,6 +73,10 @@ default.\n symbolic ref were printed correctly, with status 1 if the requested\n name is not a symbolic ref, or 128 if another error occurs.\n \n+SEE ALSO\n+--------\n+linkgit:git-update-ref[1]\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex 2e85f7ce3ee..8a4281cde9f 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -190,6 +190,10 @@ otherwise it will just try to read them and update them as a regular\n file (i.e. it will allow the filesystem to follow them, but will\n overwrite such a symlink to somewhere else with a regular filename).\n \n+SEE ALSO\n+--------\n+linkgit:git-symbolic-ref[1]\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\n-- \n2.46.1.641.g54e7913fcb6\n\n"},{"id":"505759","messageId":"Zxa+pvRAbqhmIZxy@nand.local","threadId":"62319","inReplyTo":"cover.1729543007.git.code@khaugsbakk.name","subject":"Re: [PATCH v3 0/6] doc: update-ref: amend old material and discuss symrefs","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-10-21T20:50:46Z","receivedAt":"2024-10-21T20:50:49Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Mon, Oct 21, 2024 at 10:47:23PM +0200, kristofferhaugsbakk@fastmail.com wrote:\n>  Documentation/git-symbolic-ref.txt |  4 +++\n>  Documentation/git-update-ref.txt   | 48 +++++++++++++-----------------\n>  2 files changed, 25 insertions(+), 27 deletions(-)\n\nThanks, this version looks quite good to me. Are we ready to start\nmerging this round down?\n\n(I saw that Karthik had suggested that 'v2' was already looking good to\nthem, but it would be nice to get a similar ack on this latest round).\n\nThanks,\nTaylor\n"}]}