Skip to content

main.sh: parallel submodule/repo updates with --jobs - #26

Merged
igagis merged 1 commit into
mainfrom
parallel-repos-main-sh
Dec 2, 2026
Merged

igagis merged 1 commit into
mainfrom
parallel-repos-main-sh

Conversation

@igagis-bot

Copy link
Copy Markdown
Contributor

Summary

  • New -j/--jobs <n> option (default: nproc) for updating repos.
  • git submodule update --init now passes --jobs <n> when the git version supports it (>= 2.14, verified via git help submodule), so parallel clones are used; otherwise falls back to serial with a note.
  • The per-repo loops (repos/*/ and apps/*/) are now run in parallel instead of sequentially, with output captured per repo and printed in the original order afterwards. git submodule foreach could not be used for the parallel loops: it has no --jobs option on this git (2.47.3) and its per-repo output is hard to order/filter.

Test plan

  • bash -n git/main.sh
  • Verified parallel vs serial wall-time via a stubbed git and fake repos (-j 4 vs -j 1)
  • Verified ordered output, failure counting, and the git-version fallback note

@igagis-bot
igagis-bot requested a review from igagis December 2, 2026 19:15
@igagis
igagis merged commit d8df932 into main Dec 2, 2026
0 of 12 checks passed
@igagis
igagis deleted the parallel-repos-main-sh branch December 2, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants