grep docs: describe --no-index further and improve formatting a bit
commit6e9ef296e2210260852391186ba3fc411fa5b08a
authorDragan Simic <dsimic@manjaro.org>
Mon, 25 Mar 2024 20:34:53 +0000 (25 21:34 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Mar 2024 21:00:03 +0000 (25 14:00 -0700)
tree6b0fe469129fc779ad6a00544f84e5447b0404e9
parent4a9357a1ba7e7a9f1548d2efd4975d4133fe0bac
grep docs: describe --no-index further and improve formatting a bit

Improve the description of --no-index, to make it more clear to the users
what this option actually does under the hood, and what's its purpose.
Describe the dependency between --no-index and either of the --cached and
--untracked options, which cannot be used together.

As part of that, shuffle a couple of the options, to make the documentation
flow a bit better, because it makes more sense to describe first the options
that have something in common, and to after that describe an option that does
something differently.  In more detail, --cached and --untracked both leave
git-grep(1) in the usual state, in which it treats the directory as a local
git repository, unlike --no-index that makes git-grep(1) treat the directory
not as a git repository.

While there, improve the descriptions of grep worker threads a bit, to give
them better context.  Adjust the language a bit, to avoid addressing the
reader directly, which is in general preferred in technical documentation,
because it eliminates the possible element of persuading the user to do
something.  In other words, we should be telling the user what our software
can do, instead of telling the user what to do.

Also perform some minor formatting improvements, to make it clear it's the
git commands, command parameters, and configuration option names.

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-grep.txt