Skip to content

Commit

Permalink
sync: Do not fail to sync a manifest with no projects
Browse files Browse the repository at this point in the history
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 <erik@haleytek.corp-partner.google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Tested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
  • Loading branch information
Peter Kjellerstedt authored and LUCI committed Nov 26, 2024
1 parent fafd1ec commit 616e314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subcmds/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ def _ProcessResults(pool, pm, results_sets):
objdir_project_map.setdefault(project.objdir, []).append(index)
projects_list = list(objdir_project_map.values())

jobs = min(opt.jobs_network, len(projects_list))
jobs = max(1, min(opt.jobs_network, len(projects_list)))

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

0 comments on commit 616e314

Please sign in to comment.