From: Linus Torvalds <torvalds@osdl.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] built-in "git grep" (git grip).
Date: Mon, 1 May 2006 08:48:44 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0605010842130.21189@g5.osdl.org> (raw)
In-Reply-To: <20060501145328.GA14856@mars.ravnborg.org>
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
next prev parent reply other threads:[~2006-05-01 15:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-01 6:32 [PATCH] built-in "git grep" (git grip) Junio C Hamano
2006-05-01 6:56 ` Jakub Narebski
2006-05-01 6:59 ` Junio C Hamano
2006-05-01 7:12 ` Jakub Narebski
2006-05-02 8:33 ` Andreas Ericsson
2006-05-02 8:44 ` Jakub Narebski
2006-05-02 9:01 ` Junio C Hamano
2006-05-02 9:25 ` Jakub Narebski
2006-05-02 9:39 ` Andreas Ericsson
2006-05-02 19:07 ` Junio C Hamano
2006-05-02 21:23 ` Linus Torvalds
2006-05-02 21:54 ` Junio C Hamano
2006-05-02 23:07 ` Linus Torvalds
2006-05-03 0:01 ` Junio C Hamano
2006-05-01 7:30 ` [PATCH] built-in "git grep" (git grip) - quickfix Junio C Hamano
2006-05-01 14:04 ` [PATCH] built-in "git grep" (git grip) Sam Ravnborg
2006-05-01 14:07 ` Sam Ravnborg
2006-05-01 14:53 ` Sam Ravnborg
2006-05-01 15:48 ` Linus Torvalds [this message]
2006-05-01 19:30 ` [PATCH] builtin-grep: wildcard pathspec fixes Junio C Hamano
2006-05-01 23:24 ` [PATCH] builtin-grep: do not use setup_revisions() Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0605010842130.21189@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).