Merge branch 'nd/completion-no-cache-failure' into maint

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
This commit is contained in:
Junio C Hamano 2019-07-29 12:38:20 -07:00
Родитель 97cb523f00 69702523af
Коммит 39521d07be
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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