Browse Source

completion: use __gitcomp_nl() for completing refs

We do that almost everywhere, because it's faster for large number of
refs, see a31e62629 (completion: optimize refs completion, 2011-10-15).
These were the last two places where we still used __gitcomp() for
completing refs.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
SZEDER Gábor 10 years ago committed by Junio C Hamano
parent
commit
260d5850ad
  1. 4
      contrib/completion/git-completion.bash

4
contrib/completion/git-completion.bash

@ -980,7 +980,7 @@ _git_branch ()


case "$cur" in case "$cur" in
--set-upstream-to=*) --set-upstream-to=*)
__gitcomp "$(__git_refs)" "" "${cur##--set-upstream-to=}" __gitcomp_nl "$(__git_refs)" "" "${cur##--set-upstream-to=}"
;; ;;
--*) --*)
__gitcomp " __gitcomp "
@ -1048,7 +1048,7 @@ _git_checkout ()


_git_cherry () _git_cherry ()
{ {
__gitcomp "$(__git_refs)" __gitcomp_nl "$(__git_refs)"
} }


_git_cherry_pick () _git_cherry_pick ()

Loading…
Cancel
Save