Subject: Re: [PATCH v2 2/2] bash completion: Support "divergence from upstream" warnings in __git_ps1

From: Thomas Rast <[email-masked]>
Date: Mon, 14 Jun 2010 09:44:20 +0200

Junio C Hamano wrote:
> Thomas Rast <[email-masked]> writes:
> 
> > +#       If you would like to see the difference between HEAD and its upstream,
> > +#       set GIT_PS1_SHOWUPSTREAM to one of the following:
> > +#           git          use @{upstream}
> > +#           svn          attempt to DWIM svn upstream for normal and --stdlayout
> > +#           ref <ref>    unconditionally use <ref>
> > +#           eval <code>  evaluate <code> which should print the commit to use
> 
> This looks somewhat overengineered, although "git" and "svn" are probably
> useful in real life.  I especially wonder if a fixed <ref> is useful at
> all.  Wouldn't the choice of "other" branch always depend on the current
> branch?

You're probably right.  I had 'ref' early on to test around, and then
made 'eval' to allow for arcane git-svn setups, but now that it seems
Andrew has a nice way of matching those, we can also just drop it.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch