Re: [PATCH] built-in "git grep" (git grip).

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

 




On Mon, 1 May 2006, Sam Ravnborg wrote:
> 
> Seems I have confused myself.
>
>	git grep DEBUG '*/Kconfig*'
>
> does indeed work today.

Indeed. I was a bit confused about your report, since not only does it 
work today, that's how it has always worked, and it was very much designed 
that way. I use it all the time.

It takes the git-ls-files pathname syntax, which is a bit _different_ from 
the normal "limit to these paths" syntax, in that it honors '*'. And it 
honors that a bit differently than normal shell pathname expansion, 
because for git-ls-files a '*' pattern will match '/' as well.

So

	git grep pattern 'net/*.c'

will match every single C file found _recursively_ inside the "net/" 
subdirectory, not just in that single directory itself.

So "*" for git grep is a bit more like a "**" pattern in some shells.

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