Re: Globbing for ignored branches?
- From
Jeff King <peff@peff.net>
- Date
- Jan 24, 2014, 20:48 UTC
- Message-ID
- <20140124204825.GA17167@sigill.intra.peff.net>
- In-Reply-To
- <xmqq4n4trvzj.fsf@gitster.dls.corp.google.com>
On Fri, Jan 24, 2014 at 12:00:16PM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> Jeff King <peff@peff.net> writes: > > > On Fri, Jan 24, 2014 at 07:32:22PM +0100, Markus Trippelsdorf wrote: > > > >> > However, you do have to specify each branch individually. You probably > >> > want to say "all branches except X", and you cannot currently specify > >> > a negative refspec like that. > [...] > The end result might be not so hard in the mechanical sense, but > designing the interface would be hard. I do not offhand think of a > good way to do this.
I had imagined a "not" token at the front of the refspec, like:
git fetch origin +refs/heads/*:refs/remotes/origin/* ^refs/heads/foo
In this case, a colon in the refspec would be an error. An alternative would be:
git fetch origin +refs/heads/*:refs/remotes/origin/* refs/heads/foo:
I.e., to say "put foo to nowhere". But generally refspecs do not affect each other. So "refs/heads/foo:refs/heads/bar" would generally work _in addition_ to the other refspec. Making the "null destination" work differently might be confusing.
I dunno. I have not thought very hard on the topic, so maybe there are some subtle cases I am missing.
-Peff