From: Phillip Wood <phillip.wood123@gmail.com>
To: Patrick Steinhardt <ps@pks.im>, git@vger.kernel.org
Subject: Re: [PATCH 7/7] Documentation: add "special refs" to the glossary
Date: Tue, 23 Jan 2024 16:27:20 +0000 [thread overview]
Message-ID: <4f60dd83-913d-4c66-989d-282ec1845f4b@gmail.com> (raw)
In-Reply-To: <2a0943a78d0db0f489962520536594845970e0b0.1705659748.git.ps@pks.im>
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.
Best Wishes
Phillip
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
> Documentation/glossary-content.txt | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt
> index f7d98c11e3..d71b199955 100644
> --- a/Documentation/glossary-content.txt
> +++ b/Documentation/glossary-content.txt
> @@ -638,6 +638,20 @@ The most notable example is `HEAD`.
> An <<def_object,object>> used to temporarily store the contents of a
> <<def_dirty,dirty>> working directory and the index for future reuse.
>
> +[[def_special_ref]]special ref::
> + A ref that has different semantics than normal refs. These refs can be
> + accessed via normal Git commands but may not behave the same as a
> + normal ref in some cases.
> ++
> +The following special refs are known to Git:
> +
> + - "`FETCH_HEAD`" is written by linkgit:git-fetch[1] or linkgit:git-pull[1]. It
> + may refer to multiple object IDs. Each object ID is annotated with metadata
> + indicating where it was fetched from and its fetch status.
> +
> + - "`MERGE_HEAD`" is written by linkgit:git-merge[1] when resolving merge
> + conflicts. It contains all commit IDs which are being merged.
> +
> [[def_submodule]]submodule::
> A <<def_repository,repository>> that holds the history of a
> separate project inside another repository (the latter of
next prev parent reply other threads:[~2024-01-23 16:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 10:39 [PATCH 0/7] refs: convert special refs to become normal pseudo-refs Patrick Steinhardt
2024-01-19 10:39 ` [PATCH 1/7] sequencer: clean up pseudo refs with REF_NO_DEREF Patrick Steinhardt
2024-01-19 19:14 ` Junio C Hamano
2024-01-22 10:36 ` Patrick Steinhardt
2024-01-22 11:49 ` Karthik Nayak
2024-01-22 12:28 ` Patrick Steinhardt
2024-01-19 10:40 ` [PATCH 2/7] sequencer: delete REBASE_HEAD in correct repo when picking commits Patrick Steinhardt
2024-01-19 10:40 ` [PATCH 3/7] refs: convert AUTO_MERGE to become a normal pseudo-ref Patrick Steinhardt
2024-01-19 19:28 ` Junio C Hamano
2024-01-22 10:45 ` Patrick Steinhardt
2024-01-24 3:19 ` Elijah Newren
2024-01-22 12:02 ` Karthik Nayak
2024-01-19 10:40 ` [PATCH 4/7] sequencer: introduce functions to handle autostashes via refs Patrick Steinhardt
2024-01-19 20:09 ` Junio C Hamano
2024-01-22 10:51 ` Patrick Steinhardt
2024-01-22 19:54 ` Phillip Wood
2024-01-22 20:16 ` Junio C Hamano
2024-01-19 10:40 ` [PATCH 5/7] refs: convert MERGE_AUTOSTASH to become a normal pseudo-ref Patrick Steinhardt
2024-01-19 10:40 ` [PATCH 6/7] refs: redefine special refs Patrick Steinhardt
2024-01-19 20:28 ` Junio C Hamano
2024-01-19 10:40 ` [PATCH 7/7] Documentation: add "special refs" to the glossary Patrick Steinhardt
2024-01-23 16:27 ` Phillip Wood [this message]
2024-01-24 9:05 ` Patrick Steinhardt
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=4f60dd83-913d-4c66-989d-282ec1845f4b@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=git@vger.kernel.org \
--cc=phillip.wood@dunelm.org.uk \
--cc=ps@pks.im \
/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;
as well as URLs for NNTP newsgroup(s).