Re: [PATCHv4] bash completion: Support "divergence from upstream" messages in __git_ps1
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Jun 16, 2010, 19:11 UTC
- Message-ID
- <201006162111.09557.trast@student.ethz.ch>
- In-Reply-To
- <7v7hlyg5nh.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 9 quoted lines
> Andrew Sayers <andrew-git@pileofstuff.org> writes: > > +# You can > > +# override the value of GIT_PS1_SHOWUPSTREAM on a per-repository > > +# basis by setting the bash.showUpstream config variable. > > That's totally backwards from it should be, isn't it? > > Usually configuration variables are used to give you the default, and > you use environment variables to override them.
Not in the bash completion. The test for the environment variable is cheap, so you use that to enable the feature and can then use configs to tweak them at a per-repo level. There is precedent with GIT_PS1_SHOWDIRTYSTATE and bash.showDirtyState.
The comment above should state that this override only works if the environment variable is also enabled, though.
--
Thomas Rast
trast@{inf,student}.ethz.ch