git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Refspec wildcards for remotes require trailing slash
@ 2013-12-10  2:32 Monte Goulding
  2013-12-10 19:14 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Monte Goulding @ 2013-12-10  2:32 UTC (permalink / raw
  To: git


Hi

I came across this issue the other day while trying to optimise a fetch to a repo with release branches named release-X.X.X. I wanted to just fetch just those branches but because of the trailing slash rule I couldn't. The following StackOverflow post has details of the issue:

http://stackoverflow.com/questions/20450003/is-it-possible-to-use-filters-in-refspec-in-places-other-than-directory-namespac

The trailing slash rule appears to be introduced in 46220ca and further tightened in b2a5627

Before I go ahead and look at what needs to be done for a patch I thought it would be polite to ask if there is any reasoning behind the trailing slash rule that I'm missing? Or if you are interested in changing this behavior at all.

Cheers

Monte

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Refspec wildcards for remotes require trailing slash
  2013-12-10  2:32 Refspec wildcards for remotes require trailing slash Monte Goulding
@ 2013-12-10 19:14 ` Junio C Hamano
  2013-12-10 19:59   ` Monte Goulding
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2013-12-10 19:14 UTC (permalink / raw
  To: Monte Goulding; +Cc: git

Monte Goulding <monte@sweattechnologies.com> writes:

> Before I go ahead and look at what needs to be done for a patch I
> thought it would be polite to ask if there is any reasoning behind
> the trailing slash rule that I'm missing? Or if you are interested
> in changing this behavior at all.

The log messages of the two commits you cited in your message says
that "refs/a/b/* should not match refs/a/b1, but the old code
mistakenly allowed to".  As long that fix is not broken, allowing
"refs/a/b*" to match "refs/a/b1" is OK, I would think.

But it is debatable if such a change should allow "refs/a/b*" to
match "refs/a/b/2".  Arguments can be made in both ways, and my
knee-jerk reaction is it shouldn't.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Refspec wildcards for remotes require trailing slash
  2013-12-10 19:14 ` Junio C Hamano
@ 2013-12-10 19:59   ` Monte Goulding
  0 siblings, 0 replies; 3+ messages in thread
From: Monte Goulding @ 2013-12-10 19:59 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git


On 11/12/2013, at 6:14 AM, Junio C Hamano <gitster@pobox.com> wrote:

> But it is debatable if such a change should allow "refs/a/b*" to
> match "refs/a/b/2".  Arguments can be made in both ways, and my
> knee-jerk reaction is it shouldn't.

Hmm.. for-each-ref doesn't match it but ls-remote does

Sorry: forgot to CC the list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-10 19:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10  2:32 Refspec wildcards for remotes require trailing slash Monte Goulding
2013-12-10 19:14 ` Junio C Hamano
2013-12-10 19:59   ` Monte Goulding

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).