@@ -28,7 +28,7 @@ SYNOPSIS
28
28
[-f <file>] [-e] <pattern>
29
29
[--and|--or|--not|(|)|-e <pattern>...]
30
30
[--recurse-submodules] [--parent-basename <basename>]
31
- [ [--[no-]exclude-standard] [--cached | --no-index | --untracked ] | <tree>...]
31
+ [ [--[no-]exclude-standard] [--cached | --untracked | --no-index ] | <tree>...]
32
32
[--] [<pathspec>...]
33
33
34
34
DESCRIPTION
@@ -45,13 +45,21 @@ OPTIONS
45
45
Instead of searching tracked files in the working tree, search
46
46
blobs registered in the index file.
47
47
48
- --no-index::
49
- Search files in the current directory that is not managed by Git.
50
-
51
48
--untracked::
52
49
In addition to searching in the tracked files in the working
53
50
tree, search also in untracked files.
54
51
52
+ --no-index::
53
+ Search files in the current directory that is not managed by Git,
54
+ or by ignoring that the current directory is managed by Git. This
55
+ is rather similar to running the regular `grep(1)` utility with its
56
+ `-r` option specified, but with some additional benefits, such as
57
+ using pathspec patterns to limit paths; see the 'pathspec' entry
58
+ in linkgit:gitglossary[7] for more information.
59
+ +
60
+ This option cannot be used together with `--cached` or `--untracked`.
61
+ See also `grep.fallbackToNoIndex` in 'CONFIGURATION' below.
62
+
55
63
--no-exclude-standard::
56
64
Also search in ignored files by not honoring the `.gitignore`
57
65
mechanism. Only useful with `--untracked`.
@@ -64,9 +72,9 @@ OPTIONS
64
72
--recurse-submodules::
65
73
Recursively search in each submodule that is active and
66
74
checked out in the repository. When used in combination with the
67
- <tree> option the prefix of all submodule output will be the name of
68
- the parent project's <tree> object. This option has no effect
69
- if `--no-index` is given .
75
+ _ <tree>_ option the prefix of all submodule output will be the name of
76
+ the parent project's _ <tree>_ object. This option cannot be used together
77
+ with `--untracked`, and it has no effect if `--no-index` is specified .
70
78
71
79
-a::
72
80
--text::
@@ -178,7 +186,7 @@ providing this option will cause it to die.
178
186
Use \0 as the delimiter for pathnames in the output, and print
179
187
them verbatim. Without this option, pathnames with "unusual"
180
188
characters are quoted as explained for the configuration
181
- variable core.quotePath (see linkgit:git-config[1]).
189
+ variable ` core.quotePath` (see linkgit:git-config[1]).
182
190
183
191
-o::
184
192
--only-matching::
@@ -248,8 +256,8 @@ providing this option will cause it to die.
248
256
a non-zero status.
249
257
250
258
--threads <num>::
251
- Number of grep worker threads to use.
252
- See `grep.threads` in 'CONFIGURATION' for more information.
259
+ Number of ` grep` worker threads to use. See 'NOTES ON THREADS'
260
+ and `grep.threads` in 'CONFIGURATION' for more information.
253
261
254
262
-f <file>::
255
263
Read patterns from <file>, one per line.
@@ -332,13 +340,13 @@ EXAMPLES
332
340
NOTES ON THREADS
333
341
----------------
334
342
335
- The `--threads` option (and the grep.threads configuration) will be ignored when
343
+ The `--threads` option (and the ` grep.threads` configuration) will be ignored when
336
344
`--open-files-in-pager` is used, forcing a single-threaded execution.
337
345
338
346
When grepping the object store (with `--cached` or giving tree objects), running
339
- with multiple threads might perform slower than single threaded if `--textconv`
340
- is given and there are too many text conversions. So if you experience low
341
- performance in this case, it might be desirable to use `--threads=1`.
347
+ with multiple threads might perform slower than single- threaded if `--textconv`
348
+ is given and there are too many text conversions. Thus, if low performance is
349
+ experienced in this case, it might be desirable to use `--threads=1`.
342
350
343
351
CONFIGURATION
344
352
-------------
0 commit comments