From: Andy Koppe Date: Thu, 22 Oct 2026 21:28:52 GMT Subject: [PATCH 4/5] refs: stop calling root refs pseudorefs Message-ID: <20261022212903.177261-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. Replace "pseudoref" with "root ref" in the help text for "git for-each-ref --include-root-refs", in comments in refs.h, and in comments in the bash completion script, including the one for __git_pseudoref_exists(), which is also used for root refs. The function itself is not renamed. There is no obvious term covering both root refs and pseudorefs, and the old name might need to be kept for third-party completion scripts. Update the description of pseudorefs in refs.h to match the glossary. 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 [