Re: [PATCH v2] doc: add a explanation of Git's data model
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Oct 14, 2025, 11:45 UTC
- Message-ID
- <aO43ywdCKXWchRqG@pks.im>
- In-Reply-To
- <46c6ca15-c1d2-4dd9-a6d3-2538f482b475@app.fastmail.com>
On Tue, Oct 14, 2025 at 05:18:58AM -0400, Julia Evans wrote:
Show 41 quoted lines
> > > On Tue, Oct 14, 2025, at 1:45 AM, Patrick Steinhardt wrote: > > On Mon, Oct 13, 2025 at 07:48:15AM -0700, Junio C Hamano wrote: > >> Patrick Steinhardt <ps@pks.im> writes: > >> > On Wed, Oct 08, 2025 at 01:53:41PM +0000, Julia Evans via GitGitGadget wrote: > >> > [snip] > >> > Not quite true. Pseudo refs are outside the hierarchy and are in fact > >> > treated differently. But root refs are treated the same as any other > >> > reference. > >> > > >> > References are stored in a hierarchy. While most references are > >> > stored in the "refs/" hierarchy, some references with special > >> > meaning like for example "HEAD" are stored directly in the root of > >> > the hierarchy. > >> > > >> > I don't really think we should get into root refs vs pseudo refs here, > >> > so maybe this is sufficient? > >> > >> I do not think "root ref" (or pseudo for that matter) is a concept > >> that has no use in this context. If this is really about data > >> model, where you find refs (or what the "pathname looking" thing > >> exactly look like that names your refs) should be immaterial. It > >> does help to know that HEAD is just a ref. It also would help to > >> know there are symbolic refs that point at other refs, which is much > >> more relevant to the data model. > > > > Yeah, I don't necessarily think that we need to mention root refs here. > > But what I think we need to avoid is the following sentence, as it is > > misleading: > > > > References are stored in a hierarchy, and Git handles references > > differently based on where they are in the hierarchy. > > > > Why do you say that it’s misleading? (what do you think it’s implying > that is not true?) > > What i’m trying to communicate is that branches, tags, etc are treated > differently from each other and that Git knows how to handle them > based on where they are in the hierarchy.
Oh, I think I managed to repeatedly misread this sentence! I was basically s/where/whether/ and thought that this was saying that refs are handled differently depending on whether they are stored _in_ that hierarchy or _outside_ of it. And that would have been misleading indeed.
But that's not what this sentence says at all. So please ignore this tangent, sorry :)
Patrick