e733d5d completion: do not cache if --git-completion-helper fails

Authored and Committed by tmz 4 years ago
    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.
    
        
file modified
+9 -1