git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v8 0/2] Add git-grep threads param

From
Victor Leschuk <vleschuk@gmail.com>
Date
Dec 15, 2015, 15:31 UTC
Message-ID
<1450193500-22468-1-git-send-email-vleschuk@accesssoftek.com>

Introducing v8 of git-grep threads param patch. Patch is now split in 2 parts - 1/2 is actually renewed v6 version (see list of changes below), 2/2 removes dependency on online_cpus() - as we discussed with Eric this is rather significant change in default behavior and should be placed into separate patch.

Here is list of changes since v6 ($gmane/281160):
  * Fixed broken t7811: moved all threads_num setup to 1 place (for -O option it was in wrong place)
  * Fixed 'invalid number of threads' message so that it could be translated
  * Got rid of grep_threads_config() - its too trivial to be separate function
  * Fixed xcalloc() args (sizeof(pthread_t) -> sizeof(*threads)) to correspond to general git style
  * Improved commit message (in 2/2) to explain why online_cpus() is now not used in threads_num setup
  * The full param documentation was moved into single place (grep.threads description in git-grep.txt) and is referenced from other places. Also made few language improvements in documentation.
  * Style improvements: splitted too long lines
Victor Leschuk (2):
  "git grep" can now be configured (or told from the command line)    
    how many threads to use when searching in the working tree files.
  Number of threads now doesn't depend on online_cpus(),     e.g. if
    specific number is not configured GREP_NUM_THREADS_DEFAULT (8)    
    threads will be used even on 1-core CPU.
 Documentation/config.txt               |  4 +++
 Documentation/git-grep.txt             | 12 +++++++++
 builtin/grep.c                         | 49 +++++++++++++++++++++++-----------
 contrib/completion/git-completion.bash |  1 +
 4 files changed, 51 insertions(+), 15 deletions(-)
-- 
2.6.3.369.g3e7f205.dirty
Next: Victor Leschuk
Message 1 of 6 in “Add git-grep threads param”
  1. 0/2 Add git-grep threads paramVictor Leschuk, Dec 15, 2015
  2. 1/2 Introduce grep threads paramVictor Leschuk, Dec 15, 2015
  3. Junio C HamanoDec 15, 2015
  4. Victor LeschukDec 15, 2015
  5. Eric SunshineDec 16, 2015
  6. 2/2 Get rid of online_cpus() when determining grep threads numVictor Leschuk, Dec 15, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.