From: Andy Koppe Date: Sun, 01 Nov 2026 23:03:22 GMT Subject: [PATCH v2 4/5] refs: stop calling root refs pseudorefs Message-ID: <20261101230326.3675597-5-andy.koppe@gmail.com> In-Reply-To: <20261022212903.177261-1-andy.koppe@gmail.com> 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 --- 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 [