diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-03-28 11:04:24 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-28 11:04:24 -0700 |
commit | 87cc76fa3a79eb86136e55432bd4e4ecc84744cd (patch) | |
tree | ee6f7060615a519bc5a7454e4d382b19b7ec2fed /contrib | |
parent | Sync with Git 2.16.3 (diff) | |
parent | t9902: disable test on the list of merge-strategies under GETTEXT_POISON (diff) | |
download | tgif-87cc76fa3a79eb86136e55432bd4e4ecc84744cd.tar.xz |
Merge branch 'nd/parseopt-completion'
Hotfix for recently graduated topic that give help to completion
scripts from the Git subcommands that are being completed
* nd/parseopt-completion:
t9902: disable test on the list of merge-strategies under GETTEXT_POISON
completion: clear cached --options when sourcing the completion script
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/completion/git-completion.bash | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index c7957f0a90..b09c8a2362 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -280,6 +280,10 @@ __gitcomp () esac } +# Clear the variables caching builtins' options when (re-)sourcing +# the completion script. +unset $(set |sed -ne 's/^\(__gitcomp_builtin_[a-zA-Z0-9_][a-zA-Z0-9_]*\)=.*/\1/p') 2>/dev/null + # This function is equivalent to # # __gitcomp "$(git xxx --git-completion-helper) ..." |