From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Patrick Steinhardt <ps@pks.im>
Subject: [PATCH 1/5] git.txt: HEAD is not that special
Date: Fri, 15 Dec 2023 12:32:41 -0800 [thread overview]
Message-ID: <20231215203245.3622299-2-gitster@pobox.com> (raw)
In-Reply-To: <20231215203245.3622299-1-gitster@pobox.com>
The introductory text in "git help git" that describes HEAD called
it "a special ref". It is special compared to the more regular refs
like refs/heads/master and refs/tags/v1.0.0, but not that special,
unlike truly special ones like FETCH_HEAD.
Rewrite a few sentences to also introduce the distinction between a
regular ref that contain the object name and a symbolic ref that
contain the name of another ref. Update the description of HEAD
that point at the current branch to use the more correct term, a
"symbolic ref".
This was found as part of auditing the documentation and in-code
comments for uses of "special ref" that refer merely a "pseudo ref".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Documentation/git.txt | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 2535a30194..880cdc5d7f 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -1025,10 +1025,11 @@ When first created, objects are stored in individual files, but for
efficiency may later be compressed together into "pack files".
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").
+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.
The index file is initialized with a list of all paths and, for each
--
2.43.0-76-g1a87c842ec
next prev parent reply other threads:[~2023-12-15 20:32 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 ` Junio C Hamano [this message]
2023-12-15 21:57 ` [PATCH 1/5] git.txt: HEAD is not that special 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
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=20231215203245.3622299-2-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--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).