From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>,
Jim Garrison <jim.garrison@nwea.org>,
"git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Globbing for ignored branches?
Date: Fri, 24 Jan 2014 13:08:42 -0800 [thread overview]
Message-ID: <xmqqeh3xqe91.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140124204825.GA17167@sigill.intra.peff.net> (Jeff King's message of "Fri, 24 Jan 2014 15:48:25 -0500")
Jeff King <peff@peff.net> writes:
> 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.
Not really. You do not have to view it as "'not refs/heads/foo' is
affecting the previous '+refs/heads/*:refs/remotes/origin/*'".
You can think of two refspecs "refs/heads/foo refs/heads/bar" are
both affecting the "end result"; so far we only had a single way for
multiple refspecs to affect the end result and that was a "union".
Introducing "subtract" as another mode of combining is not too bad,
I would think, at the conceptual level.
> ... Making the "null destination" work
> differently might be confusing.
I tend to agree that "refs/heads/foo:" is being too cute and may be
confusing, at least if it will be the only way to express this in
the end-user-facing UI. Even some people were confused enough on a
very sensible "push nothing to ref means deletion" to make us add
another explicit way, "push --delete", to ask for the same thing.
next prev parent reply other threads:[~2014-01-24 21:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 9:01 Globbing for ignored branches? Markus Trippelsdorf
2014-01-24 16:37 ` Jim Garrison
2014-01-24 17:07 ` Markus Trippelsdorf
2014-01-24 17:09 ` Markus Trippelsdorf
2014-01-24 18:23 ` Jeff King
2014-01-24 18:32 ` Markus Trippelsdorf
2014-01-24 18:55 ` Jeff King
2014-01-24 20:00 ` Junio C Hamano
2014-01-24 20:33 ` Markus Trippelsdorf
2014-01-24 20:44 ` Junio C Hamano
2014-01-24 20:52 ` Markus Trippelsdorf
2014-01-24 20:48 ` Jeff King
2014-01-24 21:08 ` Junio C Hamano [this message]
2014-01-25 1:34 ` Jeff King
2014-01-25 14:15 ` Markus Trippelsdorf
2014-01-25 17:15 ` Markus Trippelsdorf
2014-01-25 20:02 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqeh3xqe91.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jim.garrison@nwea.org \
--cc=markus@trippelsdorf.de \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.