aboutsummaryrefslogtreecommitdiff
path: root/t/t7002-grep.sh
Commit message (Collapse)AuthorAge
* git-grep: show pathnames relative to the current directoryJunio C Hamano2006-08-11
| | | | | | | | | | | By default, the command shows pathnames relative to the current directory. Use --full-name (the same flag to do so in ls-files) if you want to see the full pathname relative to the project root. This makes it very pleasant to run in Emacs compilation (or "grep-find") buffer. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix "grep -w"Junio C Hamano2006-08-06
We used to find the first match of the pattern and then if the match is not for the entire word, declared that the whole line does not match. But that is wrong. The command "git grep -w -e mmap" should find that a line "foo_mmap bar mmap baz" matches, by tring the second instance of pattern "mmap" on the same line. Problems an earlier round of "fix" had were pointed out by Morten Welinder, which have been incorporated in the t7002 tests. Signed-off-by: Junio C Hamano <junkio@cox.net>