From: SZEDER Gábor Date: Sun, 22 Mar 2015 12:03:11 +0000 (+0100) Subject: completion: use __gitcomp_nl() for completing refs X-Git-Tag: v2.4.0-rc0~2^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/260d5850ad452adb7ac0ab70d0a5d0211bdd967f 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 Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 8cfee95f88..05a3aa426f 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -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 " @@ -1048,7 +1048,7 @@ _git_checkout () _git_cherry () { - __gitcomp "$(__git_refs)" + __gitcomp_nl "$(__git_refs)" } _git_cherry_pick ()