Re: [PATCH 3/3] completion: Prevents GIT_PS1_DIRTYSTATE from breaking when CWD is .git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ted Pavlic <ted@xxxxxxxxxxxxx> wrote:
>
>> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux