grep docs: describe --recurse-submodules further and improve formatting a bit
Clarify that --recurse-submodules cannot be used together with --untracked, and improve the formatting in a couple of places, to make it visually clear that those are the commands or the names of configuration options. While there, change a couple of "<tree>" placeholders to "_<tree>_", to help with an ongoing translation improvement effort. [1] [1] https://lore.kernel.org/git/CAPig+cQc8W4JOpB+TMP=czketU1U7wcY_x9bsP5T=3-XjGLhRQ@mail.gmail.com/ Signed-off-by: Dragan Simic <dsimic@manjaro.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Dragan Simic committed
Mar 25, 2024 at 21:34 UTC
4a9357a1ba7e7a9f1548d2efd4975d4133fe0bac
2 files changed
+6
-6
Documentation/config/grep.txt
+1
-1
@@ -24,5 +24,5 @@ grep.fullName::
24
If set to true, enable `--full-name` option by default.
25
26
grep.fallbackToNoIndex::
27
- If set to true, fall back to git grep --no-index if git grep
27
+ If set to true, fall back to `git grep --no-index` if `git grep`
28
is executed outside of a git repository. Defaults to false.
Documentation/git-grep.txt
+5
-5
@@ -64,9 +64,9 @@ OPTIONS
64
--recurse-submodules::
65
Recursively search in each submodule that is active and
66
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.
67
+ _<tree>_ option the prefix of all submodule output will be the name of
68
+ the parent project's _<tree>_ object. This option cannot be used together
69
+ with `--untracked`, and it has no effect if `--no-index` is specified.
70
71
-a::
72
--text::
@@ -178,7 +178,7 @@ providing this option will cause it to die.
178
Use \0 as the delimiter for pathnames in the output, and print
179
them verbatim. Without this option, pathnames with "unusual"
180
characters are quoted as explained for the configuration
181
- variable core.quotePath (see linkgit:git-config[1]).
181
+ variable `core.quotePath` (see linkgit:git-config[1]).
182
183
-o::
184
--only-matching::
@@ -332,7 +332,7 @@ EXAMPLES
332
NOTES ON THREADS
333
----------------
334
335
-The `--threads` option (and the grep.threads configuration) will be ignored when
335
+The `--threads` option (and the `grep.threads` configuration) will be ignored when
336
`--open-files-in-pager` is used, forcing a single-threaded execution.
337
338
When grepping the object store (with `--cached` or giving tree objects), running