Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-03-28 21:04:24 +0300
committerJunio C Hamano <gitster@pobox.com>2018-03-28 21:04:24 +0300
commit87cc76fa3a79eb86136e55432bd4e4ecc84744cd (patch)
treeee6f7060615a519bc5a7454e4d382b19b7ec2fed /contrib
parent90bbd502d54fe920356fa9278055dc9c9bfe9a56 (diff)
parentb60e88cc780ea54de65b62437afbeb9c857110f2 (diff)
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.bash4
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) ..."