Re: [RFC PATCH] Make :/ accept a regex rather than a fixed pattern

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

 



Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes:

> From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Date: Fri, 23 Apr 2010 08:20:20 -0700
> Subject: [PATCH] Make :/ accept a regex rather than a fixed pattern
>
> This also makes it trigger anywhere in the commit message, rather than
> just at the beginning. Which tends to be a lot more useful.
>
> Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> ---
>
> I'm re-sending, because after having this in my tree for several weeks 
> now, I actually end up still using it. 
>
> I agree that it's still not a wonderful thing, and it's entirely possible 
> that we should strive to use just HEAD in :/ commit finding rather than 
> all refs we can find, but for at least the kernel, I don't care (since my 
> tree tends to have just one main branch anyway, apart from some random 
> testing stuff I keep around).
>
> But even if we want to limit it to HEAD, that would be a separate patch.
>
> I've personally used it for things like
>
> 	git show :/mqueue	# did I apply that 'mqueue' patch?
> 	git show :/akpm		# what was the last patch I got from Andrew?
>
> and while in all cases I could admittedly have done exactly the same thing 
> with something like "git log -p -1 --grep=mqueue" instead, I've used it as 
> a nice shortcut.

I already took this but I actually started hating it.  As I have
merge.summary on,

    git show ':/diff: add configuration option'

almost never hits the commit I am looking for---instead it ends up finding
a merge that merges it.

I however suspect that I would hate it much less after retraining my
fingers to anchor the pattern at the beginning of the line.  But not
yet...

--
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]