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>2019-07-10 01:25:35 +0300
committerJunio C Hamano <gitster@pobox.com>2019-07-10 01:25:36 +0300
commit0cc593998629829402d6b52e13fb424b8614985a (patch)
treec73c11ab5b25e4f0eb4c1843521276a4482f1ff9 /contrib
parent2950cbd4999e230c985be9f2b40cc0bf787fbdd3 (diff)
parent69702523afb4de692b415648e53fcfb1b4630f18 (diff)
Merge branch 'nd/completion-no-cache-failure'
An incorrect list of options was cached after command line completion failed (e.g. trying to complete a command that requires a repository outside one), which has been corrected. * nd/completion-no-cache-failure: completion: do not cache if --git-completion-helper fails
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-completion.bash3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 9f71bcde96..8c6b610a24 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -400,7 +400,8 @@ __gitcomp_builtin ()
if [ -z "$options" ]; then
# leading and trailing spaces are significant to make
# option removal work correctly.
- options=" $incl $(__git ${cmd/_/ } --git-completion-helper) "
+ options=" $incl $(__git ${cmd/_/ } --git-completion-helper) " || return
+
for i in $excl; do
options="${options/ $i / }"
done