git/contrib/completion
Jacob Keller 58a2ca37a1 completion: extract function __git_dwim_remote_heads
__git_refs() has the ability to report unique remote names for
supporting completion of remote branch names for the DWIMery of git
checkout and git switch.

For git checkout, this is fine, because it always supports completing
all local references.

However, git switch by default only supports either switching branches
or using this DWIMery to create a local branch tracking the remote
branch.

Future work to cleanup and improve completion support for git switch
will be aided if the remote branch names can be completed separately
from __git_refs.

Extract this logic to a function __git_dwim_remote_heads(), and use it
in __git_refs.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-05-28 12:53:24 -07:00
..
.gitattributes completion: mark bash script as LF-only 2017-05-10 13:32:51 +09:00
git-completion.bash completion: extract function __git_dwim_remote_heads 2020-05-28 12:53:24 -07:00
git-completion.tcsh git-completion.tcsh: fix redirect with noclobber 2015-06-09 11:21:15 -07:00
git-completion.zsh completion: clarify installation instruction for zsh 2019-10-18 13:55:49 +09:00
git-prompt.sh git-prompt: change the prompt for interactive-based rebases 2020-02-16 15:40:42 -08:00