Skip to content

Commit 616e314

Browse files
Peter KjellerstedtLUCI
authored andcommitted
sync: Do not fail to sync a manifest with no projects
Since commit 454fdaf (v2.48), syncing a manifest without any projects would result in: Repo command failed: RepoUnhandledExceptionError Number of processes must be at least 1 Bug: 377546300 Change-Id: Iaa2f6a3ac64542ad65a19c0eef449f53c09cae67 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/443442 Reviewed-by: Erik Elmeke <[email protected]> Reviewed-by: Josip Sokcevic <[email protected]> Commit-Queue: Peter Kjellerstedt <[email protected]> Tested-by: Peter Kjellerstedt <[email protected]>
1 parent fafd1ec commit 616e314

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subcmds/sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ def _ProcessResults(pool, pm, results_sets):
901901
objdir_project_map.setdefault(project.objdir, []).append(index)
902902
projects_list = list(objdir_project_map.values())
903903

904-
jobs = min(opt.jobs_network, len(projects_list))
904+
jobs = max(1, min(opt.jobs_network, len(projects_list)))
905905

906906
# We pass the ssh proxy settings via the class. This allows
907907
# multiprocessing to pickle it up when spawning children. We can't

0 commit comments

Comments
 (0)