summaryrefslogtreecommitdiff
path: root/delta-islands.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-06-12 08:56:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-12 17:36:46 (GMT)
commit69702523afb4de692b415648e53fcfb1b4630f18 (patch)
tree5ba73b6f8132f3a2a768be191ecbf114e21b13d0 /delta-islands.h
parentaeb582a98374c094361cba1bd756dc6307432c42 (diff)
downloadgit-69702523afb4de692b415648e53fcfb1b4630f18.zip
git-69702523afb4de692b415648e53fcfb1b4630f18.tar.gz
git-69702523afb4de692b415648e53fcfb1b4630f18.tar.bz2
completion: do not cache if --git-completion-helper fails
"git <cmd> --git-completion-helper" could fail if the command checks for a repo before parse_options(). If the result is cached, later on when the user moves to a worktree with repo, tab completion will still fail. Avoid this by detecting errors and not cache the completion output. We can try again and hopefully succeed next time (e.g. when a repo is found). Of course if --git-completion-helper fails permanently because of other reasons (*), this will slow down completion. But I don't see any better option to handle that case. (*) one of those cases is if __gitcomp_builtin is called on a command that does not support --git-completion-helper. And we do have a generic call __git_complete_common "$command" but this case is protected with __git_support_parseopt_helper so we're good. Reported-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'delta-islands.h')
0 files changed, 0 insertions, 0 deletions