git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/5] git.txt: HEAD is not that special

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 18, 2023, 16:26 UTC
Message-ID
<xmqqplz3h3y7.fsf@gitster.g>
In-Reply-To
<ZYAGyLH4nm4TebA_@tanuki>
Patrick Steinhardt <ps@pks.im> writes:
Show 10 quoted lines
>>  Named pointers called refs mark interesting points in history.  A ref
>> -may contain the SHA-1 name of an object or the name of another ref.  Refs
>> -with names beginning `ref/head/` contain the SHA-1 name of the most
>> +may contain the SHA-1 name of an object or the name of another ref (the
>> +latter is called a "symbolic ref").
>
> On a tangent: While we have a name for symbolic refs, do we also have a
> name for non-symbolic refs? I often use the term "direct ref" to clearly
> distinguish them from symbolic refs, but it's of course not defined in
> our glossary.

You may find me saying "normal ref", "regular ref", or somesuch when it is not clear from the context if you dig the list archive. "direct" is a nice word, especially it would give us a good pair of terms if we are to change "symbolic" to "indirect", but since we are not going to do so, I am not sure the contrast between "direct" and "symbolic" would make such a good pair.

But quite honestly I rarely felt a need for a specific term, as it is fairly clear from the context, e.g.

 * "From a ref, we locate an object using the object name it
   records and use the object"
   A statement written from the point of view of the consumer of
   object name, it does not matter if the object name is directly
   found in the ref, or indirection is involved to find such a
   concrete ref that records an object name by following the
   original symbolic ref.
 * "A ref usually stores an object name, but it can also be a
   symbolic ref that points at another ref, in which case, asking
   what object such a symbolic ref points at would yield the object
   the other ref points at".
So I dunno.
Show 9 quoted lines
>> +Refs with names beginning `ref/head/` contain the SHA-1 name of the most
>>  recent commit (or "head") of a branch under development.  SHA-1 names of
>> -tags of interest are stored under `ref/tags/`.  A special ref named
>> +tags of interest are stored under `ref/tags/`.  A symbolic ref named
>>  `HEAD` contains the name of the currently checked-out branch.
>
> I was briefly wondering whether we also want to replace SHA-1 with
> "object hash" while at it, but it's certainly out of the scope of this
> patch series.

Yup, there still are too many reference to SHA-1 (and "sha1", which is even worse), and it is not a focus of this series.

Thanks.
Previous: Patrick SteinhardtNext: Junio C Hamano
Message 13 of 26 in “make room for "special ref"”
  1. 0/5 make room for "special ref"Junio C Hamano, Dec 15, 2023
  2. 2/5 git-bisect.txt: BISECT_HEAD is not that specialJunio C Hamano, Dec 15, 2023
  3. 1/5 git.txt: HEAD is not that specialJunio C Hamano, Dec 15, 2023
  4. Ramsay JonesDec 15, 2023
  5. Junio C HamanoDec 15, 2023
  6. Junio C HamanoDec 15, 2023
  7. doc: format.notes specify a ref under refs/notes/ hierarchyJunio C Hamano, Dec 15, 2023
  8. Patrick SteinhardtDec 18, 2023
  9. Junio C HamanoDec 18, 2023
  10. Jiang XinDec 19, 2023
  11. Ramsay JonesDec 15, 2023
  12. Patrick SteinhardtDec 18, 2023
  13. Junio C HamanoDec 18, 2023
  14. 3/5 refs.h: HEAD is not that specialJunio C Hamano, Dec 15, 2023
  15. Andy KoppeDec 16, 2023
  16. 4/5 docs: AUTO_MERGE is not that specialJunio C Hamano, Dec 15, 2023
  17. 5/5 docs: MERGE_AUTOSTASH is not that specialJunio C Hamano, Dec 15, 2023
  18. Andy KoppeDec 16, 2023
  19. Junio C HamanoDec 15, 2023
  20. Ramsay JonesDec 15, 2023
  21. Junio C HamanoDec 16, 2023
  22. Patrick SteinhardtDec 18, 2023
  23. Andy KoppeDec 16, 2023
  24. Patrick SteinhardtDec 18, 2023
  25. Andy KoppeDec 16, 2023
  26. Patrick SteinhardtDec 18, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.