On 17/04/17 11:24, Junio C Hamano wrote: > "Tom \"Ravi\" Hale" writes: > > > If a user types `set -e` in an interactive shell, and is using __git_ps1 > > to set > > their prompt, the shell will die if the current directory isn't inside a git > > repository. > > > Hmph. So the fix would be something like this? > > repo_info="$(git rev-parse --git-dir --is-inside-git-dir \ > --is-bare-repository --is-inside-work-tree \ > - --short HEAD 2>/dev/null)" > + --short HEAD 2>/dev/null || :)" Nope, that would cause the next line rev_parse_exit_code="$?" to always be assigned 0. I believe the patch we're after is attached. -- Cheers, Tom