🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #2085

[PATCH v2 4/5] refs: stop calling root refs pseudorefs

#2085
From: Andy Koppe
Date: Sun, 01 Nov 2026 23:03
109 lines
15219 bytes
Some messages and comments in the code still use "pseudoref" in its old
sense of any ref outside of "refs/", whereas the glossary now calls
those root refs and restricts pseudorefs to FETCH_HEAD and MERGE_HEAD,
so update them.

Bash completion function __git_pseudoref_exists() is not renamed, as
there is no obvious term covering both root refs and pseudorefs, and
third-party completion scripts might depend on the name.

Signed-off-by: Andy Koppe <andy.koppe@gmail.com>
---
 builtin/for-each-ref.c                 |  2 +-
 contrib/completion/git-completion.bash |  7 ++++---
 refs.h                                 | 13 ++++++-------
 revision.c                             |  2 +-
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index 4a2fc421db..6ff32e919c 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -48,7 +48,7 @@ int for_each_ref_core(int argc, const char **argv, const char *prefix, struct re
 		OPT_NO_CONTAINS(&filter.no_commit, N_("print only refs which don't contain the commit")),
 		OPT_BOOL(0, "ignore-case", &icase, N_("sorting and filtering are case insensitive")),
 		OPT_BOOL(0, "stdin", &from_stdin, N_("read reference patterns from stdin")),
-		OPT_BOOL(0, "include-root-refs", &include_root_refs, N_("also include HEAD ref and pseudorefs")),
+		OPT_BOOL(0, "include-root-refs", &include_root_refs, N_("also include root refs")),
 		OPT_END(),
 	};
 
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index c3a49e2e22..e12ac0359c 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -147,8 +147,9 @@ __git_eread ()
 	test -r "$1" && IFS=$'\r\n' read -r "$2" <"$1"
 }
 
-# Runs git in $__git_repo_path to determine whether a pseudoref exists.
-# 1: The pseudo-ref to search
+# Runs git in $__git_repo_path to determine whether a root ref or
+# pseudoref exists.
+# 1: The ref to check
 __git_pseudoref_exists ()
 {
 	local ref=$1
@@ -954,7 +955,7 @@ __git_refs ()
 	esac
 }
 
-# Completes refs, short and long, local and remote, symbolic and pseudo.
+# Completes refs, short and long, local and remote, symbolic, root and pseudo.
 #
 # Usage: __git_complete_refs [<option>]...
 # --remote=<remote>: The remote to list refs from, can be the name of a
diff --git a/refs.h b/refs.h
index ee3b8a62ef..3be7ef3b0e 100644
--- a/refs.h
+++ b/refs.h
@@ -85,7 +85,7 @@ enum ref_transaction_error {
  * 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 pseudorefs, such as HEAD,
+ * Caps and underscores refers to root refs and pseudorefs, such as HEAD,
  * FETCH_HEAD and friends, that all live outside of the refs/ directory.
  */
 #define RESOLVE_REF_READING 0x01
@@ -448,8 +448,8 @@ enum refs_for_each_flag {
 	REFS_FOR_EACH_OMIT_DANGLING_SYMREFS = (1 << 2),
 
 	/*
-	 * Include root refs i.e. HEAD and pseudorefs along with the regular
-	 * refs.
+	 * Include root refs, such as HEAD and ORIG_HEAD, along with the
+	 * regular refs.
 	 */
 	REFS_FOR_EACH_INCLUDE_ROOT_REFS = (1 << 3),
 };
@@ -1306,10 +1306,9 @@ void update_ref_namespace(enum ref_namespace namespace, char *ref);
 int is_root_ref(const char *refname);
 
 /*
- * Pseudorefs are refs that have different semantics compared to
- * "normal" refs. These refs can thus not be stored in the ref backend,
- * but must always be accessed via the filesystem. The following refs
- * are pseudorefs:
+ * Pseudorefs are names that can be used like refs, but have different
+ * semantics. They cannot be stored in the ref backend, but must always
+ * be accessed via the filesystem. The following are pseudorefs:
  *
  * - FETCH_HEAD may contain multiple object IDs, and each one of them
  *   carries additional metadata like where it came from.
diff --git a/revision.c b/revision.c
index a83e499047..d6dd56faf1 100644
--- a/revision.c
+++ b/revision.c
@@ -2000,7 +2000,7 @@ static const char *lookup_other_head(struct object_id *oid)
 			return other_head[i];
 		}
 
-	die(_("--merge requires one of the pseudorefs MERGE_HEAD, CHERRY_PICK_HEAD, REVERT_HEAD or REBASE_HEAD"));
+	die(_("--merge requires one of MERGE_HEAD, CHERRY_PICK_HEAD, REVERT_HEAD or REBASE_HEAD"));
 }
 
 static void prepare_show_merge(struct rev_info *revs)
-- 
2.56.0
Technical Details
Message-ID: <20261101230326.3675597-5-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-74087-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-74087-linux-kernel-git=dewy.ru
From: andy.koppe@gmail.com (Andy Koppe)
Newsgroups: linux.kernel.git
Subject: [PATCH v2 4/5] refs: stop calling root refs pseudorefs
Date: Sun,  1 Nov 2026 23:03:22 +0000
Organization: Usenet Network
Message-ID: <20261101230326.3675597-5-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="2792041"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:xB8yzUZ5GA1m6s1VwFTgoYdwzYg= sha256:zvFsxVt0t16D/UVOUOWM1fv4/poeS7Lfpi6PnA2vkbo=
	sha1:nbriMhFo6zJKEqdw/9iL+EnaQ9w= sha256:mIwjiPi1DzlA2ioDSJYCvfRjZXiGi4N0MGHC/g0OIq0=
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 C052A1123A6; Mon,  2 Nov 2026 02:05:00 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.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, 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 N4rSwPKqH6x5;
	Mon,  2 Nov 2026 02:04:58 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-74087-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 7333411239B; Mon,  2 Nov 2026 02:04:50 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 8365E2984C; Sun,  1 Nov 2026 23:04:44 +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=1793574282;
	b=Mfc5iHdSwy+bcUFKeNNkZjYyd65RCRAe31hgHUc4yNsnqnQOheEc1aHoud/tMTBYR+zy
	 lHYKgzgchH2NhW2Z5xMa5MTSliAzAfFdJpnCpYUjFpBV2CuQmE5Cj3odNeuRRS8Lc3La9
	 LaFMHlYUiZPFMj4R4/LJJw5UmpNo6/Tz93U/v3BZazkh32nRijP2W0LHKtUMR81wC6qLz
	 mBsszIBHpqw5VjTpP0UEKWBSFFHfkjiaJ4kdevR7OpxlOgQsuqt9bvZOnjHeSSAs/Zzog
	 MPlSLD96dDH1lG4sf+W5lh3H0bnHyfF1VkMlOlrce1o3o3qWbOHTsEl0bWGbYnjsU6w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793574282;
	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=GxOWPX9IKa1Tik4gyxp8Rzlc6GbN0W1kBX7x+r8vr5g=;
	b=eBdh9YA5e0A0mLpSAOid+xCeREZ8OW+pfQ/qaU8MB8oKfo966ntTQEglO8MX5KuBkx7U
	 78NwDCFY6s7tjvYvvldN1ZSeFDA+1uhVyv0aP51a7FTLe6Dtza4OCMJpY4mgdQ1Ud8qDP
	 ej2UOuo74f8guK36WE+/px6qKYCmdBFPxjgzvU8xvzHOmpuXYjthwq5+WsqnHmgdM8ug9
	 QejftKGNaV4zcDtw94lE9c9N39J3vw4m005QBXMCMbGH3cJnXeXPxOKuVEBESY0iIqg31
	 3TXXOdmgPGNPpPex6hxzmfYgkyOWGCFmmwQlO4+3cCM84pBJKiPLHEXn199YZ6yz5Ww==
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=WciN9lB0;
	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 80573606A334;
	Sun,  1 Nov 2026 23:04:42 +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=WciN9lB0
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.51
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793574281;
	b=2lrXCAeXLrZkWTA04PolHs/c41jgUvw91Z5+4UT6vvC6s+lRNHeoTCr/KHSuwRMSncYE
	 vco+BM7hWxwCTqJO16Cd+znX9+N9DzwNFqao3As+neMSAvDIs1vDjW0jL+z0F7l6pQSOY
	 VhGJGy1hD/tUvy+OIiKOvuku2hQ/Zwx+otOwxOHfEqRNljpnwB91Ei8c2J1xyFvt9j+Q0
	 3qn0wMaw0W/YtdzHiR1gkGUJJKLAABACmZSL/kOjELlV4TWj2A7HiFBWEBljMhaLR/6K+
	 Eg6CqkO58+QIa65WxN9bvxa2V0QUhwh9noSC1m2QiGbYiiuD3LbQmD3nDElfWEQmdPA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793574281;
	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=GxOWPX9IKa1Tik4gyxp8Rzlc6GbN0W1kBX7x+r8vr5g=;
	b=E5iSV0ccDbfCKJjYYlDNXDKJGeVkt8wosVQG8s474M2MoEYcSXDHJ5ctx1mQf4JwpDPM
	 IRWKcKJw/pEd6N/sEJhU//guymATe+7p6jZ/BP0+f7tWFSif9U0RpXOtXQyZgq0XOuMjZ
	 RRbA/qb87Ygo8kRoTA6s2XT6+ELP5T48b/ksReWLbfa0TFPBRFENOqDdsbUpjqWFLqOFl
	 CfTvrKIYMu4BK0lbM1+fVi0tkVNwQt9YNGXe7yVo09/DzgAcR2P21GHNe5NE0ei5Gakz6
	 3cJvbocn7+oJOrTAYqizObCNqRQi6YYV3dy5hwISgWtSHlgX/IC6BILjKk5HxYbGKrA==
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=WciN9lB0;
	arc=none smtp.remote-ip=209.85.128.51
X-Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51])
	(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 4D02C60A2602
	for <git@vger.kernel.org>; Sun,  1 Nov 2026 23:04:41 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4D02C60A2602
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-f51.google.com with SMTP id 5b1f17b1804b1-4a2167bd087so19105905e9.3
        for <git@vger.kernel.org>; Sun, 01 Nov 2026 15:04:41 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793574280; x=1794179080; 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=GxOWPX9IKa1Tik4gyxp8Rzlc6GbN0W1kBX7x+r8vr5g=;
        b=WciN9lB0Oc7jcMJ6vrjQibPtHCwvfovyNYLYIVAwoNA1b/egCZdH+lwv577Luzx5NR
         RnQFESlJjJW2bCzRcWijE9F4+DKExeeMPmIJinDQLQ6uPYmSjzy2JtUhLMAU+tPFV4m2
         BtIm9HkLAYySHj9Ndg0firJbhoJ9Bv56ML2pWPQfClXrdmZNGvmQju6Q2vZAImNkCtgl
         PWW1/qnJJ82J3N3WiOaNyTJhfcEPu9nSzY0uhHDmrzziprugWUlD/KvsXeCC5fQLmh62
         SBi/gKqcpP010xqJlylN9Vst4rBvcSQg7Sf/W7I2O/0C/VGQMA89CEEl+qrMMocq1G/M
         pmpA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793574280; x=1794179080;
        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=GxOWPX9IKa1Tik4gyxp8Rzlc6GbN0W1kBX7x+r8vr5g=;
        b=VdTniIsADXR2orLz/h52QvfEy5U3kvhDRTHkJuGlMilAWhPdhIopGThoZj+Qb100pA
         0xfefO8CHxwvQ4QzTywwuWMsacyDRh2QAhg0EBh3h3+/f6AQ1fx1Z1fDaWFbXhZXOOJ0
         EBHP5OkqGzzB/8Rt5h+g/GcZTEX714Ky+81E2jLP+YU27CKbEU8HZA/imtlUzk+J8wZJ
         bviECxxJwy2P3DxrroYwJ2bhzThQDWxwIsqBbv6EFh2SqKBObxioQHRPxtal8QewVfoD
         atIiVS1WolOLI3HkdK/UAHdWP9Ez6fldTpDx/N5ns7jxjGxshkKDBqV20yg/6KReK/1k
         jJCQ==
X-Gm-Message-State: AFq9FYIbGwm52K4g2ZaNPGb29ar/1daC1/Jyt0vDPVoYlZMO2TyctsoF
	D8oTZe99tan/wZ2PvV8/8a5dr7NMtiCSOXpi13+wd0JDIm6GSohMFz73Vjvifttm
X-Gm-Gg: AYBFou1xuMgBz9iqMqEjGCAnkbuO1FFDq8yKU1z/YEuivas/VJ7EtB105RaXp/lN9Jt
	1owp9jLLG0BatyA5YjM/Fb9QkPUZW+V92slMc8FzSTxY+pve1Ei2IJBeaH+PVpkWfQ8dxxBT0BL
	ALAXsbpkPi93KEvAxTuHaQar/8sL09m13acezCW+5/vU9FO/9xD0x2XTywB4Au86/i/IG6+aohk
	tTxeRrrZ9AzeZYQuZ5DJ7+PFJnX+8jajx9kbR36U6tQtONxPBkfhn6gxnw8scWUh3HjI7xTmRBi
	IHsjDlNq9laxdXQsOIAS2ph4HyXfl5nnECcOvaPCy+ZmWVBByLKkOhm/ROC+1TuI0L+a5Zrq3pA
	8M9IgxOdPaHLDiS39fOdZC2jAZ87mq8alm2o51+cmbGuIAJ4ZKYUhQhtFXZQm9o9XoTygOZi/aw
	/QTvX1JPg2bvMOkQpQsoIn9SfOLEL+7vQB/YioQkEeDAEP3I00QT1Jkuv4vCMNFAY58C+q8BzgI
	rdmLmycYOau6kPhpM7rmFc90gU5Jt4JJrDfVXrB+Ht6KQD0KhjJkqZeZVu2y1eJJBkKCw4kYFyI
	N1Mx0c0sQmLze6VoUot/2Q3J+c/HRJStja8Rv6dz+tD8rwXmbMVf5fGMfCx8ZNZVXsV73XfkbMl
	+QSPuIQWNVABNjU2D+CEvjQ==
X-Received: by 2002:a05:600c:3b88:b0:4a1:cf60:dcc3 with SMTP id 5b1f17b1804b1-4ac187a6ffcmr202627025e9.29.1793574279768;
        Sun, 01 Nov 2026 15:04:39 -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-4ac0b4df257sm135151125e9.4.2026.11.01.15.04.38
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 01 Nov 2026 15:04:39 -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: <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