Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Improve "git grep" flags handling | Linus Torvalds | 2005-09-12 | 1 | -23/+41 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows any arbitrary flags to "grep", and knows about the few special grep flags that take an argument too. It also allows some flags for git-ls-files, although their usefulness is questionable. With this, something line git grep -w -1 pattern works, without the script enumerating every possible flag. [jc: this is the version Linus sent out after I showed him a barf-o-meter test version that avoids shell arrays. He must have typed this version blindly, since he said: I'm not barfing, but that's probably because my brain just shut down and is desperately trying to gouge my eyes out with a spoon. I slightly fixed it to catch the remaining arguments meant to be given git-ls-files.] Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net> | ||||
* | Allow finding things that begin with a dash in 'git grep' | Junio C Hamano | 2005-09-12 | 1 | -1/+6 |
| | | | | Signed-off-by: Junio C Hamano <junkio@cox.net> | ||||
* | [PATCH] Add "git grep" helper | Linus Torvalds | 2005-09-12 | 1 | -0/+20 |
Very convenient shorthand for git-ls-files [file-patterns] | xargs grep <pattern> which I tend to do all the time. Yes, it's trivial, but it's really nice. I can do git grep '\<some_variable\>' arch/i386 include/asm-i386 and it does exactly what you'd think it does. And since it just uses the normal git-ls-files file patterns, you can do things like git grep something 'include/*.h' and it will search all header files under the include/ subdirectory. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net> |