From: Patrick Steinhardt <ps@pks.im>
To: Andy Koppe <andy.koppe@gmail.com>
Cc: git@vger.kernel.org, Karthik Nayak <karthik.188@gmail.com>,
Julia Evans <julia@jvns.ca>
Subject: Re: [PATCH 1/5] doc: glossary: add root ref and clarify pseudorefs
Date: Fri, 23 Oct 2026 09:41:43 +0200 [thread overview]
Message-ID: <atsPsFnb5mrneAMb@pks.im> (raw)
In-Reply-To: <20261022212903.177261-2-andy.koppe@gmail.com>
On Thu, Oct 22, 2026 at 10:28:49PM +0100, Andy Koppe wrote:
> diff --git a/Documentation/glossary-content.adoc b/Documentation/glossary-content.adoc
> index 52301a56dd..b2c582254b 100644
> --- a/Documentation/glossary-content.adoc
> +++ b/Documentation/glossary-content.adoc
> @@ -500,9 +500,10 @@ exclude;;
> unusual refs.
>
> [[def_pseudoref]]pseudoref::
> - A ref that has different semantics than normal refs. These refs can be
> - read via normal Git commands, but cannot be written to by commands like
> - linkgit:git-update-ref[1].
> + A name that can be used like a <<def_ref,ref>> to refer to
> + <<def_object,objects>>, but that is not stored in the same way as refs.
> + For example, pseudorefs cannot be written by linkgit:git-update-ref[1]
> + or listed by linkgit:git-for-each-ref[1].
As Junio already mentioned, I think we should retain the information
about different semantics.
I also think that the previous guidance around how pseudorefs can be
used is weakened, because now you only list examples of how they cannot
be used. Previously though we explicitly specified that the only
supported operation is reading the refs directly. So instead of giving
examples of how they cannot be used, I think we should continue to list
the few operations that _are_ possible.
> @@ -512,6 +513,9 @@ The following pseudorefs are known to Git:
>
> - `MERGE_HEAD` is written by linkgit:git-merge[1] when resolving merge
> conflicts. It contains all commit IDs which are being merged.
> ++
> +When a pseudoref contains more than one object ID, using it to refer to an
> +object yields the first one.
This is indeed a good addition.
> @@ -640,6 +623,37 @@ format. See linkgit:git-reflog[1] for details.
> To throw away part of the development, i.e. to assign the
> <<def_head,head>> to an earlier <<def_revision,revision>>.
>
> +[[def_root_ref]]root ref::
And splitting this out makes sense, as well.
> + A <<def_ref,ref>> located in the root of the ref hierarchy, outside
> + `refs/`. Root ref names must follow these rules:
> ++
> +--
> + - The name consists of only upper-case characters or underscores.
> +
> + - The name ends with "`_HEAD`" or is equal to "`HEAD`".
> +--
> ++
> +The following irregular root refs are exceptions to these rules. This
> +list is exhaustive and shall not be extended in future:
Okay, this paragraph has been shortened a bit, which I think is a good
change.
Thanks!
Patrick
next prev parent reply other threads:[~2026-10-23 7:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 21:28 [PATCH 0/5] root refs vs pseudorefs Andy Koppe
2026-10-22 21:28 ` [PATCH 1/5] doc: glossary: add root ref and clarify pseudorefs Andy Koppe
2026-10-22 22:07 ` Junio C Hamano
2026-10-23 7:41 ` Patrick Steinhardt [this message]
2026-10-22 21:28 ` [PATCH 2/5] doc: glossary: update per-worktree refs Andy Koppe
2026-10-23 7:41 ` Patrick Steinhardt
2026-10-22 21:28 ` [PATCH 3/5] doc: stop calling root refs pseudorefs Andy Koppe
2026-10-23 7:41 ` Patrick Steinhardt
2026-10-22 21:28 ` [PATCH 4/5] refs: " Andy Koppe
2026-10-23 7:41 ` Patrick Steinhardt
2026-10-22 21:28 ` [PATCH 5/5] t: " Andy Koppe
2026-10-22 22:18 ` [PATCH 0/5] root refs vs pseudorefs Junio C Hamano
2026-10-23 13:21 ` Julia Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=atsPsFnb5mrneAMb@pks.im \
--to=ps@pks.im \
--cc=andy.koppe@gmail.com \
--cc=git@vger.kernel.org \
--cc=julia@jvns.ca \
--cc=karthik.188@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox