From: Andy Koppe <andy.koppe@gmail.com>
To: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Cc: Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH 3/5] refs.h: HEAD is not that special
Date: Sat, 16 Dec 2023 10:03:26 +0000 [thread overview]
Message-ID: <1bcd61c3-567f-4b3d-aaee-d29a6091a28d@gmail.com> (raw)
In-Reply-To: <20231215203245.3622299-4-gitster@pobox.com>
On 15/12/2023 20:32, Junio C Hamano wrote:
> In-code comment explains pseudorefs but used a wrong nomenclature
> "special ref".
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> refs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/refs.h b/refs.h
> index 23211a5ea1..ff113bb12a 100644
> --- a/refs.h
> +++ b/refs.h
> @@ -56,7 +56,7 @@ struct worktree;
> * Even with RESOLVE_REF_ALLOW_BAD_NAME, names that escape the refs/
> * directory and do not consist of all caps and underscores cannot be
> * resolved. The function returns NULL for such ref names.
> - * Caps and underscores refers to the special refs, such as HEAD,
> + * Caps and underscores refers to the pseudorefs, such as HEAD,
> * FETCH_HEAD and friends, that all live outside of the refs/ directory.
> */
> #define RESOLVE_REF_READING 0x01
gitglossary thinks that HEAD is not a pseudoref:
"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 SHA‐1 followed by whitespace. So, HEAD is not a
pseudoref, because it is sometimes a symbolic ref."
(Also, the "sometimes" there actually is "whenever you're on a branch",
which is most of the time for most people.)
Regards,
Andy
next prev parent reply other threads:[~2023-12-16 10:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 20:32 [PATCH 0/5] make room for "special ref" Junio C Hamano
2023-12-15 20:32 ` [PATCH 1/5] git.txt: HEAD is not that special Junio C Hamano
2023-12-15 21:57 ` Ramsay Jones
2023-12-15 22:06 ` Junio C Hamano
2023-12-15 22:19 ` Junio C Hamano
2023-12-15 22:28 ` [PATCH] doc: format.notes specify a ref under refs/notes/ hierarchy Junio C Hamano
2023-12-18 8:06 ` Patrick Steinhardt
2023-12-18 16:16 ` Junio C Hamano
2023-12-19 15:33 ` Jiang Xin
2023-12-15 22:37 ` [PATCH 1/5] git.txt: HEAD is not that special Ramsay Jones
2023-12-18 8:46 ` Patrick Steinhardt
2023-12-18 16:26 ` Junio C Hamano
2023-12-15 20:32 ` [PATCH 2/5] git-bisect.txt: BISECT_HEAD " Junio C Hamano
2023-12-15 20:32 ` [PATCH 3/5] refs.h: HEAD " Junio C Hamano
2023-12-16 10:03 ` Andy Koppe [this message]
2023-12-15 20:32 ` [PATCH 4/5] docs: AUTO_MERGE " Junio C Hamano
2023-12-15 20:32 ` [PATCH 5/5] docs: MERGE_AUTOSTASH " Junio C Hamano
2023-12-16 11:04 ` Andy Koppe
2023-12-15 21:21 ` [PATCH 0/5] make room for "special ref" Junio C Hamano
2023-12-15 22:44 ` Ramsay Jones
2023-12-16 0:44 ` Junio C Hamano
2023-12-18 8:41 ` Patrick Steinhardt
2023-12-16 10:20 ` Andy Koppe
2023-12-18 8:24 ` Patrick Steinhardt
2023-12-16 10:56 ` Andy Koppe
2023-12-18 8:56 ` 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=1bcd61c3-567f-4b3d-aaee-d29a6091a28d@gmail.com \
--to=andy.koppe@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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).