🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #2548

[PATCH v3 1/5] doc: glossary: add root ref and clarify pseudorefs

#2548
From: Andy Koppe
Date: Fri, 06 Nov 2026 21:31
140 lines
15981 bytes
The glossary describes refs in the root of the ref hierarchy, but does
not actually name them "root refs", even though the term is used
elsewhere, for example by "git for-each-ref --include-root-refs". It
also defines pseudorefs as refs, yet is_root_ref() deliberately excludes
them, as they are not stored or handled by the ref backend.

Add a "root ref" entry, moving the naming rules and the list of
irregular root refs there from the "ref" entry. State that pseudorefs
are not root refs, and refer to gitrevisions(7) for descriptions of
commonly used root refs and pseudorefs.

Reword the "pseudoref" entry so that it no longer calls them refs, and
explain how their additional semantics set them apart. Clarify what
FETCH_HEAD records and what its "fetch status" annotation means, and
that MERGE_HEAD is also written by git-pull(1) and not only for merge
conflicts.

Signed-off-by: Andy Koppe <andy.koppe@gmail.com>
---
 Documentation/glossary-content.adoc | 84 +++++++++++++++++------------
 1 file changed, 51 insertions(+), 33 deletions(-)

diff --git a/Documentation/glossary-content.adoc b/Documentation/glossary-content.adoc
index 52301a56dd..668f309a6f 100644
--- a/Documentation/glossary-content.adoc
+++ b/Documentation/glossary-content.adoc
@@ -500,18 +500,26 @@ exclude;;
 	unusual refs.
 
 [[def_pseudoref]]pseudoref::
-	A ref that has different semantics than normal refs. These refs can be
-	read via normal Git commands, but cannot be written to by commands like
-	linkgit:git-update-ref[1].
+	A name that can be used like a <<def_ref,ref>> to refer to an
+	<<def_object,object>>, but that has additional semantics: it can
+	record more than one object ID and may carry extra metadata. In
+	contrast to <<def_root_ref,root refs>>, pseudorefs are therefore
+	not stored or handled by the ref backend.
++
+Pseudorefs can be passed to commands such as linkgit:git-log[1] or
+linkgit:git-diff[1], but cannot be written by linkgit:git-update-ref[1]
+or listed by linkgit:git-for-each-ref[1]. When a pseudoref contains more
+than one object ID, using it to refer to an object yields the first one.
 +
 The following pseudorefs are known to Git:
++
+ - `FETCH_HEAD` is written by linkgit:git-fetch[1] or linkgit:git-pull[1]
+   to record the objects that have been fetched. Each object is annotated
+   with the ref and repository it was fetched from and whether it is to be
+   merged when pulling.
 
- - `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.
+ - `MERGE_HEAD` is written by linkgit:git-merge[1] or linkgit:git-pull[1]
+   to record the commits being merged while a merge is in progress.
 
 [[def_pull]]pull::
 	Pulling a <<def_branch,branch>> means to <<def_fetch,fetch>> it and
@@ -562,33 +570,12 @@ The following pseudorefs are known to Git:
 +
 The ref namespace is hierarchical.
 Ref names must either start with `refs/` or be located in the root of
-the hierarchy. For the latter, their name must follow these rules:
-+
---
- - The name consists of only upper-case characters or underscores.
-
- - The name ends with "`_HEAD`" or is equal to "`HEAD`".
---
-+
-There are some irregular refs in the root of the hierarchy that do not
-match these rules. The following list is exhaustive and shall not be
-extended in the future:
-+
---
- - `AUTO_MERGE`
-
- - `BISECT_EXPECTED_REV`
-
- - `NOTES_MERGE_PARTIAL`
-
- - `NOTES_MERGE_REF`
-
- - `MERGE_AUTOSTASH`
---
+the hierarchy, in which case they must follow the naming rules for
+<<def_root_ref,root refs>>.
 +
 Different subhierarchies are used for different purposes. For example,
 the `refs/heads/` hierarchy is used to represent local branches whereas
-the `refs/tags/` hierarchy is used to represent local tags..
+the `refs/tags/` hierarchy is used to represent local tags.
 +
 See also "REFERENCES" in linkgit:gitdatamodel[7].
 
@@ -640,6 +627,37 @@ format. See linkgit:git-reflog[1] for details.
 	To throw away part of the development, i.e. to assign the
 	<<def_head,head>> to an earlier <<def_revision,revision>>.
 
+[[def_root_ref]]root ref::
+	A <<def_ref,ref>> located in the root of the ref hierarchy, outside
+	`refs/`. Root ref names must follow these rules:
++
+--
+ - The name consists of only upper-case characters or underscores.
+
+ - The name ends with "`_HEAD`" or is equal to "`HEAD`".
+--
++
+The following irregular root refs are exceptions to these rules. This
+list is exhaustive and shall not be extended in future:
++
+--
+ - `AUTO_MERGE`
+
+ - `BISECT_EXPECTED_REV`
+
+ - `NOTES_MERGE_PARTIAL`
+
+ - `NOTES_MERGE_REF`
+
+ - `MERGE_AUTOSTASH`
+--
++
+<<def_pseudoref,Pseudorefs>> are not considered root refs, even though
+they follow the naming rules.
++
+See linkgit:gitrevisions[7] for descriptions of commonly used root refs
+and pseudorefs.
+
 [[def_SCM]]SCM::
 	Source code management (tool).
 
-- 
2.56.0
Technical Details
Message-ID: <5630c671dbfc4a017e6698674c4b3f09d45cda54.1794000450.git.andy.koppe@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74728-linux-kernel-git=dewy.ru
References: <20261022212903.177261-1-andy.koppe@gmail.com> <cover.1794000450.git.andy.koppe@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74728-linux-kernel-git=dewy.ru
From: andy.koppe@gmail.com (Andy Koppe)
Newsgroups: linux.kernel.git
Subject: [PATCH v3 1/5] doc: glossary: add root ref and clarify pseudorefs
Date: Fri,  6 Nov 2026 21:31:04 +0000
Organization: Usenet Network
Message-ID: <5630c671dbfc4a017e6698674c4b3f09d45cda54.1794000450.git.andy.koppe@gmail.com>
References: <20261022212903.177261-1-andy.koppe@gmail.com> <cover.1794000450.git.andy.koppe@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3980845"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ippMB5ZbCKIDLdQFGb3zgrHKT+g= sha256:BUipyIvYNtJNBrC+sV+6/0P0wsIKpaiLjpRepvnGmvo=
	sha1:/oS8lPtd2ur82j7RxHq1d0bUiMc= sha256:uFNfdYhAXSM3qGZEyUQOA6kyoLpEt5PO0WBcLBtNy8k=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 81DE3113345; Sat,  7 Nov 2026 00:36:01 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id S21ZKhali7JM;
	Sat,  7 Nov 2026 00:35:57 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-74728-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 6547A113342; Sat,  7 Nov 2026 00:35:47 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 7C3983148B; Fri,  6 Nov 2026 21:34:34 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794000874;
	b=vfnlxFkKSyYM6Nr5oIkCybLY4TQ0VM2ggvW92VEq8NmIq6FfEut0/lZ3e76ULHQoVMqP
	 e/vQK+ESSuJIpXdwWk7tZfawTG41D5sKiwdMUuav4ZxpYwy8YmX3pVHv4BMcghZIvyGzC
	 eMJ2JP+1M62jpQyL1i2wXykv+/V+8zGFxxNaQP2B7hyyzTAdR2fJCeGkbPZDyRov1GtRX
	 GirAhbMeBHLH4MyLT/uPr62kaqr4qvgECC31vFi5QI0Lzpvf0HkjtWxWIj3tCwJyKLPad
	 YY/iWrQrYncGnMQlu+dHQig3sLFuq6rebSCQltURqn8aXC6pv3I5kslEeZvUbBbD88w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794000874;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:
	 References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=EpzZJpS3GExQ3o95v+uCgkRQsOfCc384Ku1E4IkbAx8=;
	b=v8WkLQtGo/tKRg3/82MhQZsicIBE366dR9zWsnU0K1sc2ks3IAvklvoCJtGckyzReV2a
	 5ziRZUFzM4HsFVym9DG9b4VyTdN3iqghfWuGTzksJJVDSvIpQVNHG53iPnsmvWc6nkflF
	 5kTwVr2oMXDPS8/UZqNsY1/kC2YLo5meaxrP8I3NZpBnUu53nKnyGFaTnblvg7Sc0pDzC
	 mlp2GYKgCGDX63Uxi+otbvIW3CVv8c4MD1lYai79rbMSvUYkwAph7xib1xKsqxQt8urk6
	 j1Xbz3HAAjg042PWBloKtPsh/VCDZLa3aWTSuVGqCej9hOYH0y79wH7qAOpOSeMuufA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=bIv4wOiZ;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 537BF606A32C;
	Fri,  6 Nov 2026 21:34:34 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=bIv4wOiZ
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.52
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794000873;
	b=0hljj9PCEperk3Ie/eTO5C89ElOXNhq9HO0N6bn/GV0uEbMvIp0QENasUJ9gGkgQXC1K
	 xxE+CEDHOqulaf0O9v2EvPjczG3JYYCJDMxum67yteOlJ5rBc9EhwzoFCtIVBLqxlSEbY
	 gnii2IO/j7hHoA4VvcnX+ajyaUxJMOR0pnwvWjWfwIG6gIn0Jji0KnOUsUQjDnOVnh7y5
	 IWxyV/wrYWwHzflbzOMyNMzig3wMSidBjOzLgm3xs6JpnVewTBfq5ZMi3pL70qw6tGpdj
	 R4VmTfM1oJJAzERJDXFMd8BOtcGKF7hL7QX9mI/xyOZUECrP5tQGvE+1+rHji1AO7AA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794000873;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=EpzZJpS3GExQ3o95v+uCgkRQsOfCc384Ku1E4IkbAx8=;
	b=KeY9JE7ArEVTAeEyw/X1yB6fShpWw2EF0b4JnWWZp7x0HQ2LMah/M6q0TScgdhfzIbDQ
	 V17UrcaguiPbgphqkrUQS5sg69plgx4nLymf7LOgRdDjQvKJVQwYTjLRXBPoPLm9VC9Ab
	 SQHUaj/QTVyV43ukrgpktkWTLXl6EEGla+CmNbCHWOzQs2Td9crendEwVh66OMPv80jdF
	 kIocImZwADgT9EOSaYqMCpe/gwNRtzpac0V7meQxbVQ8nkDZ4kbITygzXrz1ePWwHO4lf
	 Ab6S2zo5aQWyxbK0faCQ1Pi0MdmyrXKu2BlRfD6xuhrQ0EmHaWvmjLTOFr/kTiG94ig==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=bIv4wOiZ;
	arc=none smtp.remote-ip=209.85.128.52
X-Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12106606A329
	for <git@vger.kernel.org>; Fri,  6 Nov 2026 21:34:32 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 12106606A329
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4a215e64962so12736265e9.1
        for <git@vger.kernel.org>; Fri, 06 Nov 2026 13:34:32 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1794000871; x=1794605671; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=EpzZJpS3GExQ3o95v+uCgkRQsOfCc384Ku1E4IkbAx8=;
        b=bIv4wOiZaGlWlGYS3v/qDz3dn2tCaoJEXiCEJKO0/QbLkY9QzKSd91lUWilBhHFilu
         1mnAsZE51xdwDcm1HEGHBXCiXpoSEXvn/qHyMb++8vdYEd7Fts8cTKb070a4xAA2IH9d
         F1eQr4pN8z7yUG24D0acBOEMDy3kXvYyZwNXSUfd6Vd0O0nj0wuysywpqCCWnfxIMXLn
         c9akmBbd53CvGwoB7sIFgbTVcghL7nEN6EhDGkh8040N8KVOOpS9Y/BO7xAV9vPGS9hl
         03vdpzKCfek/Eydz95b4LEb97F0rkSRbicTNTPrcKGdbMfGVAFphjvek5BAz0eiNxOfz
         wLGw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1794000871; x=1794605671;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from
         :to:cc:subject:date:message-id:reply-to:content-type;
        bh=EpzZJpS3GExQ3o95v+uCgkRQsOfCc384Ku1E4IkbAx8=;
        b=jc/Ezd9Udi+C92ZZrmlBRTtL/j5z6KR5DmIThkj7/8qenO/sXxfvhn7eSeFL4+Oerz
         8t8Vwj2uQTbBTcAskN4pRvcuLgB0f0n2KMzdfralJp9k0W6+DGkLhKWVwtVR36F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==
X-Received: by 2002:a05:600c:3509:b0:4a6:4d6b:a840 with SMTP id 5b1f17b1804b1-4b6e0172854mr72559245e9.31.1794000871337;
        Fri, 06 Nov 2026 13:34:31 -0800 (PST)
X-Received: from u.ad.analog.com (sgyl-40-b2-v4wan-169439-cust3365.vm6.cable.virginm.net. [92.234.157.38])
        by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4b7e3271867sm9994385e9.6.2026.11.06.13.34.29
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Fri, 06 Nov 2026 13:34:30 -0800 (PST)
X-Cc: Andy Koppe <andy.koppe@gmail.com>,
	Patrick Steinhardt <ps@pks.im>,
	Karthik Nayak <karthik.188@gmail.com>,
	Julia Evans <julia@jvns.ca>
X-Mailer: git-send-email 2.56.0
X-In-Reply-To: <cover.1794000450.git.andy.koppe@gmail.com>
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list