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

Re: [PATCH] fetch: choose a sensible default with --jobs=0 again

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 21, 2023, 20:15 UTC
Message-ID
<xmqqcz62epw3.fsf@gitster.g>
In-Reply-To
<pull.1483.git.1676928805555.gitgitgadget@gmail.com>

"Matthias Aßhauer via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 8 quoted lines
> From: =?UTF-8?q?Matthias=20A=C3=9Fhauer?= <mha1993@live.de>
>
> prior to 51243f9 (run-command API: don't fall back on online_cpus(),
> 2022-10-12) `git fetch --multiple --jobs=0` would choose some default amount
> of jobs, similar to `git -c fetch.parallel=0 fetch --multiple`. While our
> documentation only ever promised that `fetch.parallel` would fall back to a
> "sensible default", it makes sense to do the same for `--jobs`. So fall back
> to online_cpus() and not BUG() out.

Yup, the way I read 51243f9f (run-command API: don't fall back on online_cpus(), 2022-10-12) is that it wanted to make it a best practice for the callers of the API to be making an explicit choice of scaling with online_cpus() or other metrics depending on their needs. The problematic commit does touch some fetch-related code paths and make them call online_cpus() themselves, so we probably are looking at an inadequate tests, and this is a fix that is in line of the spirit, completing what 51243f9f started to do.

Thanks, will queue.
Previous: Matthias Aßhauer via GitGitGadget
Message 2 of 2 in “fetch: choose a sensible default with --jobs=0 again”
  1. fetch: choose a sensible default with --jobs=0 againMatthias Aßhauer via GitGitGadget, Feb 20, 2023
  2. Junio C HamanoFeb 21, 2023

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.