summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-07-08 13:15:02 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-07-08 13:15:02 -0700
commita38c4c02e536b772526ad236b9887e28dab1d1e1 (patch)
tree9ac5e80a89b18467ca09c151e5ce370fc78614ea
parentMerge branch 'jk/test-without-readlink-1' (diff)
parentcompletion: bash: fix late declaration of __git_cmd_idx (diff)
downloadtgif-a38c4c02e536b772526ad236b9887e28dab1d1e1.tar.xz
Merge branch 'fw/complete-cmd-idx-fix'
Recent update to completion script (in contrib/) broke those who use the __git_complete helper to define completion to their custom command. * fw/complete-cmd-idx-fix: completion: bash: fix late declaration of __git_cmd_idx
-rw-r--r--contrib/completion/git-completion.bash1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 4073d67f3b..4bdd27ddc8 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -3513,6 +3513,7 @@ fi
__git_func_wrap ()
{
local cur words cword prev
+ local __git_cmd_idx=0
_get_comp_words_by_ref -n =: cur words cword prev
$1
}