Skip to content

Commit

Permalink
completion: use __gitcomp_nl() for completing refs
Browse files Browse the repository at this point in the history
We do that almost everywhere, because it's faster for large number of
refs, see a31e626 (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>
  • Loading branch information
SZEDER Gábor authored and Junio C Hamano committed Mar 22, 2015
1 parent bb85775 commit 260d585
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ _git_branch ()

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

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

_git_cherry_pick ()
Expand Down

0 comments on commit 260d585

Please sign in to comment.