author | Linus Torvalds <torvalds@osdl.org> | |
Thu, 14 Sep 2006 17:45:12 +0000 (10:45 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 14 Sep 2006 18:46:11 +0000 (11:46 -0700) | ||
commit | 7977f0ea53fad7103c83e5bd61777da27451f1d6 | |
tree | 5f67ed25cb9a4d1cf6d23e381aac47cf588bfa8d | tree | snapshot |
parent | 38529e28a4f465ad5d5f2fa249ca17da680bac5f | commit | diff |
Add "-h/-H" parsing to "git grep"
It turns out that I actually wanted to avoid the filenames (because I
didn't care - I just wanted to see the context in which something was
used) when doing a grep. But since "git grep" didn't take the "-h"
parameter, I ended up having to do "grep -5 -h *.c" instead.
So here's a trivial patch that adds "-h" (and thus has to enable -H too)
to "git grep" parsing.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
It turns out that I actually wanted to avoid the filenames (because I
didn't care - I just wanted to see the context in which something was
used) when doing a grep. But since "git grep" didn't take the "-h"
parameter, I ended up having to do "grep -5 -h *.c" instead.
So here's a trivial patch that adds "-h" (and thus has to enable -H too)
to "git grep" parsing.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-grep.c | diff | blob | history |