{"thread":{"id":"35511","subject":"Refspec wildcards for remotes require trailing slash","startedAt":"2013-12-10T02:32:26Z","lastAt":"2013-12-10T19:59:45Z","messageCount":3,"participants":["Monte Goulding","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"231845","messageId":"3B290FD1-EF2B-4419-8845-45C5A3B4A3D3@sweattechnologies.com","threadId":"35511","inReplyTo":null,"subject":"Refspec wildcards for remotes require trailing slash","fromName":"Monte Goulding","fromEmail":"monte@sweattechnologies.com","sentAt":"2013-12-10T02:32:26Z","receivedAt":"2013-12-10T02:32:26Z","isPatch":false,"sender":{"key":"monte@sweattechnologies.com","avatar":null},"body":"\nHi\n\nI 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:\n\nhttp://stackoverflow.com/questions/20450003/is-it-possible-to-use-filters-in-refspec-in-places-other-than-directory-namespac\n\nThe trailing slash rule appears to be introduced in 46220ca and further tightened in b2a5627\n\nBefore 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.\n\nCheers\n\nMonte"},{"id":"231869","messageId":"xmqqzjo8tt5y.fsf@gitster.dls.corp.google.com","threadId":"35511","inReplyTo":"3B290FD1-EF2B-4419-8845-45C5A3B4A3D3@sweattechnologies.com","subject":"Re: Refspec wildcards for remotes require trailing slash","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-12-10T19:14:33Z","receivedAt":"2013-12-10T19:14:33Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Monte Goulding <monte@sweattechnologies.com> writes:\n\n> Before I go ahead and look at what needs to be done for a patch I\n> thought it would be polite to ask if there is any reasoning behind\n> the trailing slash rule that I'm missing? Or if you are interested\n> in changing this behavior at all.\n\nThe log messages of the two commits you cited in your message says\nthat \"refs/a/b/* should not match refs/a/b1, but the old code\nmistakenly allowed to\".  As long that fix is not broken, allowing\n\"refs/a/b*\" to match \"refs/a/b1\" is OK, I would think.\n\nBut it is debatable if such a change should allow \"refs/a/b*\" to\nmatch \"refs/a/b/2\".  Arguments can be made in both ways, and my\nknee-jerk reaction is it shouldn't.\n"},{"id":"231872","messageId":"569D9126-F0FB-41A2-AB83-D002C2C2B679@sweattechnologies.com","threadId":"35511","inReplyTo":"xmqqzjo8tt5y.fsf@gitster.dls.corp.google.com","subject":"Re: Refspec wildcards for remotes require trailing slash","fromName":"Monte Goulding","fromEmail":"monte@sweattechnologies.com","sentAt":"2013-12-10T19:59:45Z","receivedAt":"2013-12-10T19:59:45Z","isPatch":false,"sender":{"key":"monte@sweattechnologies.com","avatar":null},"body":"\nOn 11/12/2013, at 6:14 AM, Junio C Hamano <gitster@pobox.com> wrote:\n\n> But it is debatable if such a change should allow \"refs/a/b*\" to\n> match \"refs/a/b/2\".  Arguments can be made in both ways, and my\n> knee-jerk reaction is it shouldn't.\n\nHmm.. for-each-ref doesn't match it but ls-remote does\n\nSorry: forgot to CC the list\n"}]}