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

Re: [PATCH 7/7] Documentation: add "special refs" to the glossary

From
Patrick Steinhardt <ps@pks.im>
Date
Jan 24, 2024, 09:05 UTC
Message-ID
<ZbDS6B5mjLeQ8pIy@tanuki>
In-Reply-To
<4f60dd83-913d-4c66-989d-282ec1845f4b@gmail.com>
On Tue, Jan 23, 2024 at 04:27:20PM +0000, Phillip Wood wrote:
Show 24 quoted lines
> Hi Patrick
> 
> On 19/01/2024 10:40, Patrick Steinhardt wrote:
> > Add the "special refs" term to our glossary.
> 
> Related to this the glossary entry for pseudorefs says
> 
>         Pseudorefs are a class of files under `$GIT_DIR` which behave
>         like refs for the purposes of rev-parse, but which are treated
>         specially by git.  Pseudorefs both have names that are all-caps,
>         and always start with a line consisting of a
>         <<def_SHA1,SHA-1>> followed by whitespace.  So, HEAD is not a
>         pseudoref, because it is sometimes a symbolic ref.  They might
>         optionally contain some additional data.  `MERGE_HEAD` and
>         `CHERRY_PICK_HEAD` are examples.  Unlike
>         <<def_per_worktree_ref,per-worktree refs>>, these files cannot
>         be symbolic refs, and never have reflogs.  They also cannot be
>         updated through the normal ref update machinery.  Instead,
>         they are updated by directly writing to the files.  However,
>         they can be read as if they were refs, so `git rev-parse
>         MERGE_HEAD` will work.
> 
> which is very file-centric. We should probably update that as we're moving
> away from filesystem access except for special refs.

Good point indeed, thanks for the hint! Will update in a future patch series.

Patrick
Previous: Phillip Wood
Message 23 of 23 in “refs: convert special refs to become normal pseudo-refs”
  1. 0/7 refs: convert special refs to become normal pseudo-refsPatrick Steinhardt, Jan 19, 2024
  2. 1/7 sequencer: clean up pseudo refs with REF_NO_DEREFPatrick Steinhardt, Jan 19, 2024
  3. Junio C HamanoJan 19, 2024
  4. Patrick SteinhardtJan 22, 2024
  5. Karthik NayakJan 22, 2024
  6. Patrick SteinhardtJan 22, 2024
  7. 2/7 sequencer: delete REBASE_HEAD in correct repo when picking commitsPatrick Steinhardt, Jan 19, 2024
  8. 3/7 refs: convert AUTO_MERGE to become a normal pseudo-refPatrick Steinhardt, Jan 19, 2024
  9. Junio C HamanoJan 19, 2024
  10. Patrick SteinhardtJan 22, 2024
  11. Elijah NewrenJan 24, 2024
  12. Karthik NayakJan 22, 2024
  13. 4/7 sequencer: introduce functions to handle autostashes via refsPatrick Steinhardt, Jan 19, 2024
  14. Junio C HamanoJan 19, 2024
  15. Patrick SteinhardtJan 22, 2024
  16. Phillip WoodJan 22, 2024
  17. Junio C HamanoJan 22, 2024
  18. 5/7 refs: convert MERGE_AUTOSTASH to become a normal pseudo-refPatrick Steinhardt, Jan 19, 2024
  19. 6/7 refs: redefine special refsPatrick Steinhardt, Jan 19, 2024
  20. Junio C HamanoJan 19, 2024
  21. 7/7 Documentation: add "special refs" to the glossaryPatrick Steinhardt, Jan 19, 2024
  22. Phillip WoodJan 23, 2024
  23. Patrick SteinhardtJan 24, 2024

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.