🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #1200

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

#1200
From: Andy Koppe
Date: Thu, 22 Oct 2026 21:28
127 lines
15000 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 backends.

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, add
git-for-each-ref(1) as another example of how they are not proper refs,
and explain that using a pseudoref containing multiple object IDs yields
the first one.

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

diff --git a/Documentation/glossary-content.adoc b/Documentation/glossary-content.adoc
index 52301a56dd..b2c582254b 100644
--- a/Documentation/glossary-content.adoc
+++ b/Documentation/glossary-content.adoc
@@ -500,9 +500,10 @@ 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
+	<<def_object,objects>>, but that is not stored in the same way as refs.
+	For example, pseudorefs cannot be written by linkgit:git-update-ref[1]
+	or listed by linkgit:git-for-each-ref[1].
 +
 The following pseudorefs are known to Git:
 
@@ -512,6 +513,9 @@ The following pseudorefs are known to Git:
 
  - `MERGE_HEAD` is written by linkgit:git-merge[1] when resolving merge
    conflicts. It contains all commit IDs which are being merged.
++
+When a pseudoref contains more than one object ID, using it to refer to an
+object yields the first one.
 
 [[def_pull]]pull::
 	Pulling a <<def_branch,branch>> means to <<def_fetch,fetch>> it and
@@ -562,33 +566,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 +623,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: <20261022212903.177261-2-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-72909-linux-kernel-git=dewy.ru
References: <20261022212903.177261-1-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-72909-linux-kernel-git=dewy.ru
From: andy.koppe@gmail.com (Andy Koppe)
Newsgroups: linux.kernel.git
Subject: [PATCH 1/5] doc: glossary: add root ref and clarify pseudorefs
Date: Thu, 22 Oct 2026 22:28:49 +0100
Organization: Usenet Network
Message-ID: <20261022212903.177261-2-andy.koppe@gmail.com>
References: <20261022212903.177261-1-andy.koppe@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="339679"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:/nuB9mgKR+dH2YPW+1B5nYas9TE= sha256:0h+gGRcYCQVESV82X5cEQqRiVcHiskX4uCTCkZfL2Nw=
	sha1:xrNT7+W8eykcW2qKKUnchnqnXC4= sha256:ME/kVzXhVqRGaJNwdy79iOgP2YyVgVg0l5fo2wdj57A=
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 0E429111388; Fri, 23 Oct 2026 00:29:54 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.048
X-Spam-Status: No, score=-2.048 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, FORGED_GMAIL_RCVD=1,
	FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
	HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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 sSk-Z02PSaL6;
	Fri, 23 Oct 2026 00:29:51 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-72909-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 202E4111385; Fri, 23 Oct 2026 00:29:42 +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 A9C9738D5F; Thu, 22 Oct 2026 21:29:36 +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=1792704576;
	b=tuYmjtzDU61gdrbXYJA02NdO87QE3B3bHzcKeYKY3XJDp3jQ84Hc9q7s9txmrA9QZcqZ
	 vF4Ppozs/PdIrkA1wp6iKSb9crvEXEGSV+30x5QISeoX4FpoEYLurbpsj6Gm19lfXz0UC
	 yXm1syw3WIZmRXWGoJtvJXTL9jB5xBtTRZyM5BCV4jxrjhyf85bJQnVM7sAu0vxXWLBNF
	 qpAOSIfFDFv2msHoM5LirUnFjHblFsQ6312PVDX5HxtqP17kDoIZy6e05xDNMpPcxHfLY
	 w4VP4hFdAp2A7kyGrqLJt7yAuPtZcX0kNYT6PXJe/lNouZv6EWlV+TAOQziKmif3ejQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792704576;
	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=Kl3GVBtaLHcipTM1lmRypkANn8+glxtyxmfD5YqSP+E=;
	b=DERVnO+t2E12iCsBZKEIZN5eyOE17lUy8rRu4wi/KyoPAJiTbQ7CvWp/w3zaFhHAzvaw
	 SAbe7BbI00OcOhBScb9YimqKZr1b9/X/U9XKQX6Gz20CoxfqFLpiF8D9FCygSE2HTVrTF
	 ZaiyvVQAjrU6tx9gEGroq4+hO4SGv1ihw+ib+XOhWNcWbuIDoUGtRhQ1k5lWB7bQjH8L0
	 9154vqpl5XLU0WMiqR1aU2bp/S5lJcEBRee3nd6w5ci1y3c4hcP6nX7A5zZ4f5FnHnKVD
	 tcusDuNMzvvcH5IOVk21zy/bYlGuLgN7c7aNcnyoOcBWoaAYy9kPLiPpxu+V7DHTSAg==
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=20251104 header.b=eHkIRspP;
	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 809BF606A320;
	Thu, 22 Oct 2026 21:29:36 +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=20251104 header.b=eHkIRspP
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.46
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792704575;
	b=GnlXgU/PiuqLswVD8pdSGNBB5E8Iz8eWD9rUj+5kFqi2k80xMky/dy9pWROzYulz3bRT
	 tcf9Og9j6zOFugK4TcCkmCdGKltK3b/yrykI6OWGMHhC1Upd+fYQMsAPllv/BU4TfmL2f
	 yah0M5dwCJI9HvBX82hM19CaOCBW3eu9kcUdVQ9+KRGU+WTy1zWcyxDU8nXwEc91Iix7y
	 spOBqyQzBLXltM7z7sXqpwhv7erITmHB6HXAXCojvPW/bBgK+PToWBCVCcP9L+8dAsDUA
	 rPlLbeKhoKWkxsePiBHmlSRU9vyh5zG0+bLi5oOD3TE5C+sDNjwXPhK/Ca2TN0bfcOw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792704575;
	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=Kl3GVBtaLHcipTM1lmRypkANn8+glxtyxmfD5YqSP+E=;
	b=bqedr+IyGjLqqhXlc6tEvx9U2gUnA7oKoLkoqxYN90VL9HsWZQqIgdWvD+coTFkiICxS
	 vx+x+/t/VVXUtjVsgBvA6z6Nxda10Mrmnnp4O49kWI2gxlsyuj+tbNmgGOQrpsy8IjvPZ
	 YKeK3Xmt2hnTpvSwWZl6KZ3bh2ZVxuE/nUWlaMSFEz5brrPr1bPT9JtMocJeQfHASrF6m
	 8vIKJx8+BYE3HHb7a9p8D4JuvDQGpnyX0aHKCkyn91FS4ob9BUZ3g9JgNydr0vVyw05rp
	 xRDky0Ysn3CY7APpCmuCNLriPTcQhqR81M+NYu8Bl8fAvcjs2AFAnR8vhGzm0L+4j7A==
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=20251104 header.b=eHkIRspP;
	arc=none smtp.remote-ip=209.85.221.46
X-Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46])
	(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 4FA76606A31D
	for <git@vger.kernel.org>; Thu, 22 Oct 2026 21:29:35 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4FA76606A31D
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-wr1-f46.google.com with SMTP id ffacd0b85a97d-48afbd2c386so113248f8f.3
        for <git@vger.kernel.org>; Thu, 22 Oct 2026 14:29:35 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1792704574; x=1793309374; 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=Kl3GVBtaLHcipTM1lmRypkANn8+glxtyxmfD5YqSP+E=;
        b=eHkIRspP1Tyyggz65g7nKdRZWsGl19Re2nisx9Er2vvheiwQjPdgEy5NIDjpxKDRHT
         j+CriS9u0aaBp+kPKMvMPG0W62af5QXxQ7UgBb6tJ7g8er9izP7Dy+89lmHlCeac8eib
         QCPRox34cmOL01tXq9WKjkjmffFKu3ljkf5Gx3JK61oKBEmenMgnLqfXq0U08/HPGTqf
         AGaxmfGgvRb12JMKACQSygUEtlqI20NxUYYLBrNaeP1usZHGtsqVq/Xq1hZE5HH2zYG8
         4WdvcnEQTxWfsw7MLTv9WTkcx8CmJEVcZ9BwwIOIPdJNNf5Uj9d2ITGJu2JVqMVIZ7VI
         prug==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792704574; x=1793309374;
        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=Kl3GVBtaLHcipTM1lmRypkANn8+glxtyxmfD5YqSP+E=;
        b=tk9q1cRPRcBvqN2+XtXvjxBcyoMUlXgNZtI70mAlyTdeTTSnPttIOdKYesDffET731
         Syn4n2Ol5pYRsTtOksrtjklpbVA2GbYxz7ShL4jOcgQaxxQzh+XSPjCj/uV45qR36LMS
         fLrnw+24TXLjHtdXkrNFxyluLzd8A0diP4VvZiF8fNUfLzA5srIPIa7ji8Z+ExcAreCT
         FQoMkxcdDMGLyocq8AOBdcbd42HeM+CphffHjzNUnH1uJNs6IZBGG6pmgTolzE0UHa+1
         EFZoRTHZRym1Ou0vr7TNZNrWM9+ttSnRN4KM8GufGxcqJyScwoy2TiPM3Ljs8OGaILXd
         dy8Q==
X-Gm-Message-State: AFq9FYJIJICiQwC/1xLDElHKkC8PTOMi3o8PbL2VMFETUqBpFomRnHFP
	x1B2cN34SXt5LYuozUyLzufx+49bux7xcMoDJ/5ASZ8GHhC/V+b6M4MWPIvprctw
X-Gm-Gg: AYBFou317tkhTQjphbgz0BFinXfb3Iif5id5z89Yy2IukvxRyvTJxMl+9HGEzRbwYk0
	8RGlW3JyNvvYsdeNOUQpEIhiM8M4G5h7NdzqFRtzUHIQhmrX0bcGQUSAWHSDqI+Kcmnpe1bx8wc
	CX2cGVocCZCc/IcCofW/xSVtk38Be7h+LRml5+jY8Ou66E/Z1+Qk2uD1UDxxkQw+nEMrVuFmf0u
	161M8XBgbc14F7LJglqyf4lfzHGzGbIEldANwucr/MU/zg9F7B2NQv7NKrvp5/xNocRWceNuT2h
	w1oEGV/oed+UpJ/0lMBAWZpnB0fqVRk4TDm0bA2YpUFRpOekz9lvBFkNEYek/X1pVgJ8dWE2p+F
	9ek3rQkVzc7+6xJWopnXeugM1UufayGrwTSsMgPnwoI+PdfwjdZI0ESEmBXWXdaV6MO9zSazdmB
	Sr9LCTGY5rqbTVBOMxK14idC7cKNiiCF60VL56g1I8oeRxOzk9qEAZrfVm1iQ//lLGPnP54rfKl
	2Qv2Nj4ESrOtKhA4R5oKsqX1HLnsVI6bd31uzs2GvOgInJsMNFOm4E8bFis0pen+1VRTTDaiHFD
	aZR72auOVWn3ISsf8aZ7eRwjNGZ4w6XPIVTngMkSWpCotrFu
X-Received: by 2002:a5d:5d86:0:b0:48c:7037:aee9 with SMTP id ffacd0b85a97d-48e385a7452mr156824f8f.50.1792704573388;
        Thu, 22 Oct 2026 14:29:33 -0700 (PDT)
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 ffacd0b85a97d-48e38044e8fsm739355f8f.31.2026.10.22.14.29.32
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 22 Oct 2026 14:29:32 -0700 (PDT)
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: <20261022212903.177261-1-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