Skip to content

Commit 2e48fcd

Browse files
MarkLodatogitster
authored andcommitted
grep docs: document --no-index option
Also clarify --cached and <tree>. Signed-off-by: Mark Lodato <lodatom@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent ec2537b commit 2e48fcd

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

Documentation/git-grep.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SYNOPSIS
2121
[-A <post-context>] [-B <pre-context>] [-C <context>]
2222
[-f <file>] [-e] <pattern>
2323
[--and|--or|--not|(|)|-e <pattern>...]
24-
[--cached | <tree>...]
24+
[--cached | --no-index | <tree>...]
2525
[--] [<pathspec>...]
2626

2727
DESCRIPTION
@@ -33,8 +33,11 @@ registered in the index file, or blobs in given tree objects.
3333
OPTIONS
3434
-------
3535
--cached::
36-
Instead of searching in the working tree files, check
37-
the blobs registered in the index file.
36+
Instead of searching tracked files in the working tree, search
37+
blobs registered in the index file.
38+
39+
--no-index::
40+
Search files in the current directory, not just those tracked by git.
3841

3942
-a::
4043
--text::
@@ -164,7 +167,8 @@ OPTIONS
164167
there is a match and with non-zero status when there isn't.
165168

166169
<tree>...::
167-
Search blobs in the trees for specified patterns.
170+
Instead of searching tracked files in the working tree, search
171+
blobs in the given trees.
168172

169173
\--::
170174
Signals the end of options; the rest of the parameters

0 commit comments

Comments
 (0)