diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-07-09 22:25:35 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-09 22:25:36 (GMT) |
commit | 0cc593998629829402d6b52e13fb424b8614985a (patch) | |
tree | c73c11ab5b25e4f0eb4c1843521276a4482f1ff9 /contrib | |
parent | 2950cbd4999e230c985be9f2b40cc0bf787fbdd3 (diff) | |
parent | 69702523afb4de692b415648e53fcfb1b4630f18 (diff) | |
download | git-0cc593998629829402d6b52e13fb424b8614985a.zip git-0cc593998629829402d6b52e13fb424b8614985a.tar.gz git-0cc593998629829402d6b52e13fb424b8614985a.tar.bz2 |
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.bash | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 9f71bcd..8c6b610 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 |