Re: [PATCH 3/3] completion: Prevents GIT_PS1_DIRTYSTATE from breaking when CWD is .git
Ted Pavlic <ted@tedpavlic.com> wrote:
Show 19 quoted lines
>
>> You have at least three possible states:
>> * You are not in git repository at all;
>> * You are somewhere in $GIT_DIR, perhaps in a bare repository, perhaps a
>> repository with a work tree.
>> * You are inside a work tree.
>
> It seems like (psuedocode)...
>
> if git rev-parse --is-inside-git-dir; then
> use '!' flag to indicate caution
>
> elif git rev-parse --is-inside-work-tree; then
> proceed as before (with '*' and '+' flags)
>
> else
> do nothing
>
> I think that handles those cases. No?
Yes, that looks right to me.
--
Shawn.