From cd45a8c5cc3eed5c7a230f1b76b039608c7bdc80 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 31 May 2025 20:30:23 +0200 Subject: [PATCH] completions/git: add more special refs These are things like .git/HEAD, i.e. the ones that are typically not namespaced under .git/refs. The list is taken from gitrevisions(7). --- share/completions/git.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/completions/git.fish b/share/completions/git.fish index e2f936382..e0c772cb4 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -82,7 +82,8 @@ end function __fish_git_heads set -l gitdir (__fish_git rev-parse --git-dir 2>/dev/null) or return # No git dir, no need to even test. - for head in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD + for head in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD REVERT_HEAD \ + CHERRY_PICK_HEAD BISECT_HEAD AUTO_MERGE if test -f $gitdir/$head echo $head end