path: root/Documentation/git-grep.txt
diff options
authorJunio C Hamano <>2006-08-11 07:44:42 (GMT)
committerJunio C Hamano <>2006-08-12 02:08:10 (GMT)
commit0d042fecf2f4130717d198f9cc2d792e72370bda (patch)
tree45f19a371877c20fcae9166795e17143863a0982 /Documentation/git-grep.txt
parentc8769f76d992ed391d169cd71be009ca17727271 (diff)
git-grep: show pathnames relative to the current directory
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 <>
Diffstat (limited to 'Documentation/git-grep.txt')
1 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index dc76833..7545dd9 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -11,7 +11,7 @@ SYNOPSIS
'git-grep' [--cached]
[-a | --text] [-I] [-i | --ignore-case] [-w | --word-regexp]
- [-v | --invert-match]
+ [-v | --invert-match] [--full-name]
[-E | --extended-regexp] [-G | --basic-regexp] [-F | --fixed-strings]
[-n] [-l | --files-with-matches] [-L | --files-without-match]
[-c | --count]
@@ -47,6 +47,12 @@ OPTIONS
-v | --invert-match::
Select non-matching lines.
+ When run from a subdirectory, the command usually
+ outputs paths relative to the current directory. This
+ option forces paths to be output relative to the project
+ top directory.
-E | --extended-regexp | -G | --basic-regexp::
Use POSIX extended/basic regexp for patterns. Default
is to use basic regexp.