Re: [PATCH/RFC] branch: add optional parameter to -r to specify remote

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> On Mon, Jun 20, 2011 at 08:40:32AM +0200, Johannes Sixt wrote:
>
>> > 	$ git branch --match "jk/*"
>> > 
>> > to show only local topic branches whose names match the given blob.
>> 
>> I would hate having to learn a new syntax '--match "jk/*"' when we can
>> already say
>> 
>>     $ git log --remotes
>>     $ git log --remotes=alice --remotes=bob
>>     $ git log --remotes="jk/*"
>> 
>> IMO, it is the right approach to have a long option --remotes with an
>> optional argument.

Yeah, it was just me being sloppy. I didn't mean to suggest a brand new
option name "--match"; I was merely saying that it should be something
that specifies filtering.  Except for the last one, if you are naming
remotes, that also would make sense.

But not the last one at least in the context of the example I gave in my
message. I wanted to see local topic branches whose names match jk/* so
using --remotes is actively wrong.

> For that matter, --match should be spelled "--glob", as we already have:
>
>   $ git log --glob='jk/*'
>
> I think having the ref-selection for "git branch" match that of the
> revision walker makes sense.

Yes, again I was just being sloppy and did not mean to introduce a brand
new --match; --glob indeed is a lot more appropriate in the examples I
gave in the message.

Here are two other examples of "listing" mode of the branch command:

	$ git branch --no-merged --glob="jc/*" pu
	$ git branch --with jc/some-topic --glob="maint-*" --glob=maint

I sometimes wish if they had such filtering.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]