From: Junio C Hamano Date: Thu, 12 Apr 2012 15:04:26 GMT Subject: Re: push.default: current vs upstream Message-ID: <7viph5gfet.fsf@alter.siamese.dyndns.org> In-Reply-To: <20120412071150.GB31122@sigill.intra.peff.net> Jeff King writes: > On Sat, Apr 07, 2012 at 09:40:26AM +0100, Andrew Sayers wrote: > >> On a slight aside, should we add @{downstream} to describe the opposite >> of @{upstream}? Seeing that around the place would give intermediate >> users a clue about why pull and push aren't as related as they think, >> and would be useful here and there in code (e.g. __git_ps1 could show a >> better bash prompt with GIT_PS1_SHOWUPSTREAM). > > Maybe. I don't really see how it is useful, but maybe you want to flesh > our your proposal with some examples? I do not use __git_ps1, so I'm not > sure what you want to improve there. I took "downstream" as an opposite of "upstream". The "upstream" of your branch is often (but not always) a remote tracking branch, and because it makes sense to only have zero or one (but not more) branch.$name.merge, "$name@{upstream}" would mean something. There is an N-to-1 mapping from branches to their upstreams. Given a remote tracking branch $name, (or if you use "upstream" to fork your branch off of another of your branches, it could be a local branch), there can be many branches that call it an "upstream", which means that the notation "$name@{downstream}" cannot even map to a single object name or a refname; it is a 1-to-N mapping. So I thought this was a joke and not a serious proposal.