summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-07-08 20:15:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-07-08 20:15:02 (GMT)
commita38c4c02e536b772526ad236b9887e28dab1d1e1 (patch)
tree9ac5e80a89b18467ca09c151e5ce370fc78614ea
parent62473695d2e3ef9c07b71d8decce92bc6cd5c469 (diff)
parentcea232194d4da32696df26f9b5ad00d5624621db (diff)
downloadgit-a38c4c02e536b772526ad236b9887e28dab1d1e1.zip
git-a38c4c02e536b772526ad236b9887e28dab1d1e1.tar.gz
git-a38c4c02e536b772526ad236b9887e28dab1d1e1.tar.bz2
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 4073d67..4bdd27d 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
}