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>
SZEDER Gábor committed
Mar 22, 2015 at 13:03 UTC
260d5850ad452adb7ac0ab70d0a5d0211bdd967f
1 file changed
+2
-2
contrib/completion/git-completion.bash
+2
-2
@@ -980,7 +980,7 @@ _git_branch ()
980
981
case "$cur" in
982
--set-upstream-to=*)
983
- __gitcomp "$(__git_refs)" "" "${cur##--set-upstream-to=}"
983
+ __gitcomp_nl "$(__git_refs)" "" "${cur##--set-upstream-to=}"
984
;;
985
--*)
986
__gitcomp "
@@ -1048,7 +1048,7 @@ _git_checkout ()
1048
1049
_git_cherry ()
1050
{
1051
- __gitcomp "$(__git_refs)"
1051
+ __gitcomp_nl "$(__git_refs)"
1052
}
1053
1054
_git_cherry_pick ()