diff mbox series

[2/5] grep docs: describe --recurse-submodules further and improve formatting a bit

Message ID 784912a8d9156fa00ddee218fd600254d7bab160.1710781235.git.dsimic@manjaro.org (mailing list archive)
State New, archived
Headers show
Series New config option for git-grep to include untracked files | expand

Commit Message

Dragan Simic March 18, 2024, 5:03 p.m. UTC
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.

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
---
 Documentation/config/grep.txt | 2 +-
 Documentation/git-grep.txt    | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Eric Sunshine March 18, 2024, 8:02 p.m. UTC | #1
On Mon, Mar 18, 2024 at 1:04 PM Dragan Simic <dsimic@manjaro.org> wrote:
> 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.
>
> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
> ---
> diff --git a/Documentation/config/grep.txt b/Documentation/config/grep.txt
> @@ -24,5 +24,5 @@ grep.fullName::
>  grep.fallbackToNoIndex::
> -       If set to true, fall back to git grep --no-index if git grep
> +       If set to true, fall back to `git grep --no-index` if `git grep`

Good.

> diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
> @@ -65,8 +65,8 @@ OPTIONS
>         <tree> option the prefix of all submodule output will be the name of
> -       the parent project's <tree> object. This option has no effect
> -       if `--no-index` is given.
> +       the parent project's <tree> object.  This option cannot be used together
> +       with `--untracked`, and it has no effect if `--no-index` is specified.

I believe that there is a patch series currently in-flight which is
re-styling in-prose <foo> placeholders as _<foo>_, so you may want to
make that change as well while you're touching this.
Dragan Simic March 18, 2024, 10:14 p.m. UTC | #2
On 2024-03-18 21:02, Eric Sunshine wrote:
> On Mon, Mar 18, 2024 at 1:04 PM Dragan Simic <dsimic@manjaro.org> 
> wrote:
>> 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.
>> 
>> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
>> ---
>> diff --git a/Documentation/config/grep.txt 
>> b/Documentation/config/grep.txt
>> @@ -24,5 +24,5 @@ grep.fullName::
>>  grep.fallbackToNoIndex::
>> -       If set to true, fall back to git grep --no-index if git grep
>> +       If set to true, fall back to `git grep --no-index` if `git 
>> grep`
> 
> Good.
> 
>> diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
>> @@ -65,8 +65,8 @@ OPTIONS
>>         <tree> option the prefix of all submodule output will be the 
>> name of
>> -       the parent project's <tree> object. This option has no effect
>> -       if `--no-index` is given.
>> +       the parent project's <tree> object.  This option cannot be 
>> used together
>> +       with `--untracked`, and it has no effect if `--no-index` is 
>> specified.
> 
> I believe that there is a patch series currently in-flight which is
> re-styling in-prose <foo> placeholders as _<foo>_, so you may want to
> make that change as well while you're touching this.

Thanks for the notice.  I'll add that to the v2 of this series, if
there will be other reasons for the v2.
diff mbox series

Patch

diff --git a/Documentation/config/grep.txt b/Documentation/config/grep.txt
index e521f20390ce..10041f27b0c8 100644
--- a/Documentation/config/grep.txt
+++ b/Documentation/config/grep.txt
@@ -24,5 +24,5 @@  grep.fullName::
 	If set to true, enable `--full-name` option by default.
 
 grep.fallbackToNoIndex::
-	If set to true, fall back to git grep --no-index if git grep
+	If set to true, fall back to `git grep --no-index` if `git grep`
 	is executed outside of a git repository.  Defaults to false.
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index 0d0103c780af..ade69f00ebdd 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -65,8 +65,8 @@  OPTIONS
 	Recursively search in each submodule that is active and
 	checked out in the repository.  When used in combination with the
 	<tree> option the prefix of all submodule output will be the name of
-	the parent project's <tree> object. This option has no effect
-	if `--no-index` is given.
+	the parent project's <tree> object.  This option cannot be used together
+	with `--untracked`, and it has no effect if `--no-index` is specified.
 
 -a::
 --text::
@@ -178,7 +178,7 @@  providing this option will cause it to die.
 	Use \0 as the delimiter for pathnames in the output, and print
 	them verbatim. Without this option, pathnames with "unusual"
 	characters are quoted as explained for the configuration
-	variable core.quotePath (see linkgit:git-config[1]).
+	variable `core.quotePath` (see linkgit:git-config[1]).
 
 -o::
 --only-matching::