get_sha1_with_context: dynamically allocate oc->path
[gitweb.git] / Documentation / git-grep.txt
index 4a44d6da13cb749759f9d6164b88974ba55485ab..71f32f35089241bc452cfdccdc6b3e9a30f95366 100644 (file)
@@ -23,8 +23,10 @@ SYNOPSIS
           [--break] [--heading] [-p | --show-function]
           [-A <post-context>] [-B <pre-context>] [-C <context>]
           [-W | --function-context]
+          [--threads <num>]
           [-f <file>] [-e] <pattern>
           [--and|--or|--not|(|)|-e <pattern>...]
+          [--recurse-submodules] [--parent-basename <basename>]
           [ [--[no-]exclude-standard] [--cached | --no-index | --untracked] | <tree>...]
           [--] [<pathspec>...]
 
@@ -40,21 +42,29 @@ CONFIGURATION
 -------------
 
 grep.lineNumber::
-       If set to true, enable '-n' option by default.
+       If set to true, enable `-n` option by default.
 
 grep.patternType::
        Set the default matching behavior. Using a value of 'basic', 'extended',
-       'fixed', or 'perl' will enable the '--basic-regexp', '--extended-regexp',
-       '--fixed-strings', or '--perl-regexp' option accordingly, while the
+       'fixed', or 'perl' will enable the `--basic-regexp`, `--extended-regexp`,
+       `--fixed-strings`, or `--perl-regexp` option accordingly, while the
        value 'default' will return to the default matching behavior.
 
 grep.extendedRegexp::
-       If set to true, enable '--extended-regexp' option by default. This
-       option is ignored when the 'grep.patternType' option is set to a value
+       If set to true, enable `--extended-regexp` option by default. This
+       option is ignored when the `grep.patternType` option is set to a value
        other than 'default'.
 
+grep.threads::
+       Number of grep worker threads to use.  If unset (or set to 0),
+       8 threads are used by default (for now).
+
 grep.fullName::
-       If set to true, enable '--full-name' option by default.
+       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
+       is executed outside of a git repository.  Defaults to false.
 
 
 OPTIONS
@@ -79,6 +89,19 @@ OPTIONS
        mechanism.  Only useful when searching files in the current directory
        with `--no-index`.
 
+--recurse-submodules::
+       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.
+
+--parent-basename <basename>::
+       For internal use only.  In order to produce uniform output with the
+       --recurse-submodules option, this option can be used to provide the
+       basename of a parent's <tree> object to a submodule so the submodule
+       can prefix its output with the parent's name rather than the SHA1 of
+       the submodule.
+
 -a::
 --text::
        Process binary files as if they were text.
@@ -227,6 +250,10 @@ OPTIONS
        effectively showing the whole function in which the match was
        found.
 
+--threads <num>::
+       Number of grep worker threads to use.
+       See `grep.threads` in 'CONFIGURATION' for more information.
+
 -f <file>::
        Read patterns from <file>, one per line.