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
This commit is contained in:
commit
d180cc2979
@ -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);
|
||||
|
@ -197,4 +197,9 @@ test_expect_success 'parallel' '
|
||||
test_i18ngrep "could not fetch .two.*128" err
|
||||
'
|
||||
|
||||
test_expect_success 'git fetch --multiple --jobs=0 picks a default' '
|
||||
(cd test &&
|
||||
git fetch --multiple --jobs=0)
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Loading…
Reference in New Issue
Block a user