aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-grep.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-14 12:54:20 -0800
committerJunio C Hamano <gitster@pobox.com>2020-02-14 12:54:20 -0800
commit56ceb64eb0377acb2884226d4fb7d7c3f4032354 (patch)
tree3ab8775533954b285d1abf67d2ea0f53c7149154 /Documentation/git-grep.txt
parent0da63da7942ce810126cd54d9f72a46f3d616895 (diff)
parentf1928f04b2510c522c25d482e6ab4a17077add9a (diff)
downloadgit-56ceb64eb0377acb2884226d4fb7d7c3f4032354.tar.gz
Merge branch 'mt/threaded-grep-in-object-store'
Traditionally, we avoided threaded grep while searching in objects (as opposed to files in the working tree) as accesses to the object layer is not thread-safe. This limitation is getting lifted. * mt/threaded-grep-in-object-store: grep: use no. of cores as the default no. of threads grep: move driver pre-load out of critical section grep: re-enable threads in non-worktree case grep: protect packed_git [re-]initialization grep: allow submodule functions to run in parallel submodule-config: add skip_if_read option to repo_read_gitmodules() grep: replace grep_read_mutex by internal obj read lock object-store: allow threaded access to object reading replace-object: make replace operations thread-safe grep: fix racy calls in grep_objects() grep: fix race conditions at grep_submodule() grep: fix race conditions on userdiff calls
Diffstat (limited to 'Documentation/git-grep.txt')
-rw-r--r--Documentation/git-grep.txt15
1 files changed, 13 insertions, 2 deletions
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index ffc3a6efdc..ddb6acc025 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -59,8 +59,8 @@ grep.extendedRegexp::
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).
+ Number of grep worker threads to use. If unset (or set to 0), Git will
+ use as many threads as the number of logical cores available.
grep.fullName::
If set to true, enable `--full-name` option by default.
@@ -348,6 +348,17 @@ EXAMPLES
`git grep solution -- :^Documentation`::
Looks for `solution`, excluding files in `Documentation`.
+NOTES ON THREADS
+----------------
+
+The `--threads` option (and the grep.threads configuration) will be ignored when
+`--open-files-in-pager` is used, forcing a single-threaded execution.
+
+When grepping the object store (with `--cached` or giving tree objects), running
+with multiple threads might perform slower than single threaded if `--textconv`
+is given and there're too many text conversions. So if you experience low
+performance in this case, it might be desirable to use `--threads=1`.
+
GIT
---
Part of the linkgit:git[1] suite