Re: [PATCH 07/19] completion: make __gitdir() store repository path in $__git_dir

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

 



SZEDER Gábor <szeder@xxxxxxxxxx> writes:

> Also declare $__git_dir as local in __git_ps1() and _gitk() to prevent
> the variable from leaking into the environment when they call
> __gitdir() (that would break completion and bash prompt when the user
> moves to a different git repository).

Good; this was actually the only major thing I worried about when I saw
the tail part of the series.  So $__git_dir is global across the call
chain of a single invocation to show __git_ps1, but it always is reset
once __git_ps1 is called again, so that it will always know where the
then-current git repository is, right?

Looks quite a sane and valid optimization to me.
--
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]