diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-02-24 22:54:00 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-24 22:54:00 -0800 |
commit | d180cc297922569e530da843bee4df3964167dea (patch) | |
tree | 85a377687a1b6a5ed5e9e71fa145e2020d01d5df /builtin | |
parent | c5f7ef5fdc2d60af86669931829e4da57e2eed68 (diff) | |
parent | c39952b925ccf59e49f3c174861a862dc1721492 (diff) | |
download | git-d180cc297922569e530da843bee4df3964167dea.tar.gz |
Merge branch 'ma/fetch-parallel-use-online-cpus'
"git fetch --jobs=0" used to hit a BUG(), which has been corrected
to use the available CPUs.
* ma/fetch-parallel-use-online-cpus:
fetch: choose a sensible default with --jobs=0 again
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fetch.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index a21ce89312..a09606b472 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -2196,6 +2196,9 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) if (dry_run) write_fetch_head = 0; + if (!max_jobs) + max_jobs = online_cpus(); + if (!git_config_get_string_tmp("fetch.bundleuri", &bundle_uri) && fetch_bundle_uri(the_repository, bundle_uri, NULL)) warning(_("failed to fetch bundles from '%s'"), bundle_uri); |