summaryrefslogtreecommitdiff
path: root/Documentation/git-grep.txt
diff options
context:
space:
mode:
authorLibravatar Philippe Blain <levraiphilippeblain@gmail.com>2020-01-30 13:37:28 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-01-30 10:15:58 -0800
commitc56c48dd0750dc7759f5e9a33cd4a01d6162b06e (patch)
tree87437a6c07061fa41004364aaff82797b457613e /Documentation/git-grep.txt
parent.mailmap: fix erroneous authorship for Johannes Schindelin (diff)
downloadtgif-c56c48dd0750dc7759f5e9a33cd4a01d6162b06e.tar.xz
grep: ignore --recurse-submodules if --no-index is given
Since grep learned to recurse into submodules in 0281e487fd (grep: optionally recurse into submodules, 2016-12-16), using --recurse-submodules along with --no-index makes Git die(). This is unfortunate because if submodule.recurse is set in a user's ~/.gitconfig, invoking `git grep --no-index` either inside or outside a Git repository results in fatal: option not supported with --recurse-submodules Let's allow using these options together, so that setting submodule.recurse globally does not prevent using `git grep --no-index`. Using `--recurse-submodules` should not have any effect if `--no-index` is used inside a repository, as Git will recurse into the checked out submodule directories just like into regular directories. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-grep.txt')
-rw-r--r--Documentation/git-grep.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index c89fb569e3..ffc3a6efdc 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -96,7 +96,8 @@ OPTIONS
Recursively search in each submodule that has been initialized 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.
+ the parent project's <tree> object. This option has no effect
+ if `--no-index` is given.
-a::
--text::