summaryrefslogtreecommitdiff
path: root/t/t7002-grep.sh
AgeCommit message (Collapse)AuthorFilesLines
2006-08-11git-grep: show pathnames relative to the current directoryLibravatar Junio C Hamano1-2/+29
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>
2006-08-06Fix "grep -w"Libravatar Junio C Hamano1-0/+85
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>