Re: [PATCH v2] completion: do not cache if --git-completion-helper fails

2019-06-12 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > "git --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 th

[PATCH v2] completion: do not cache if --git-completion-helper fails

2019-06-12 Thread Nguyễn Thái Ngọc Duy
"git --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