git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Junio C Hamano <gitster@pobox.com>,
	Jim Garrison <jim.garrison@nwea.org>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Globbing for ignored branches?
Date: Sat, 25 Jan 2014 15:02:17 -0500	[thread overview]
Message-ID: <20140125200217.GA5608@sigill.intra.peff.net> (raw)
In-Reply-To: <20140125141542.GA402@x4>

On Sat, Jan 25, 2014 at 03:15:42PM +0100, Markus Trippelsdorf wrote:

> Many thanks for the patch. It seems to work as advertised, but only if
> the negative refspec appears on a separate line. For example:
> 
> [remote "origin"]
>         url = git://gcc.gnu.org/git/gcc.git
>         fetch = +refs/heads/*:refs/remotes/origin/*
>         fetch = ^refs/remotes/hjl
> 
> works fine, but:
> 
> [remote "origin"]
>         url = git://gcc.gnu.org/git/gcc.git
>         fetch = +refs/heads/*:refs/remotes/origin/* ^refs/remotes/hjl 

That does not have anything to do with the negative refspec. The config
format is one refspec per "fetch" key, but you may have as many keys as
you like. Doing:

  [remote "origin"]
  fetch = refs/heads/a:refs/heads/a refs/heads/b:refs/heads/b

is similarly wrong. You need to do:

  [remote "origin"]
  fetch = refs/heads/a:refs/heads/a
  fetch = refs/heads/b:refs/heads/b

instead.  I believe that since space is forbidden in refnames, it should
also be forbidden in refspecs, which means that we could interpret the
first one as you expected without losing backwards compatibility. But I
do not think there is any real advantage to doing so, aside from being
more forgiving. I suspect the documentation in that area could be
improved, though.

-Peff

      parent reply	other threads:[~2014-01-25 20:02 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
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 [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140125200217.GA5608@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jim.garrison@nwea.org \
    --cc=markus@trippelsdorf.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).