From: Patrick Steinhardt Date: Wed, 24 Jan 2024 09:05:44 GMT Subject: Re: [PATCH 7/7] Documentation: add "special refs" to the glossary Message-ID: In-Reply-To: <4f60dd83-913d-4c66-989d-282ec1845f4b@gmail.com> On Tue, Jan 23, 2024 at 04:27:20PM +0000, Phillip Wood wrote: > 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 > <> 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 > <>, 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