Skip to content

RFC git submodule update in C with parallel cloning

Stefan Beller git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest12 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12git submodule update: Announce skipping submodules on stderrgit-submodule.sh+1 -12 replies
2/12git submodule update: Announce uninitialized modules on stderrgit-submodule.sh t/t7400-submodule-basic.sh+7 -71 reply
3/12git submodule update: Move branch calculation to where it's neededgit-submodule.sh+1 -11 reply
4/12git submodule update: Announce outcome of submodule operation to stderrgit-submodule.sh t/t7406-submodule-update.sh+7 -70 replies
5/12git submodule update: Use its own list implementation.builtin/submodule--helper.c git-submodule.sh+41 -12 replies
6/12git submodule update: Handle unmerged submodules in Cbuiltin/submodule--helper.c git-submodule.sh+12 -92 replies
7/12submodule config: keep update strategy aroundsubmodule-config.c submodule-config.h+12 -00 replies
8/12git submodule update: check for "none" in Cbuiltin/submodule--helper.c git-submodule.sh+37 -90 replies
9/12git submodule update: Check url in Cbuiltin/submodule--helper.c git-submodule.sh+21 -100 replies
10/12git submodule update: Clone projects from within Cbuiltin/submodule--helper.c git-submodule.sh+63 -50 replies
11/12submodule--helper: Do not emit submodules to process directly.builtin/submodule--helper.c+10 -20 replies
12/12WIP/broken Clone all outstanding submodules in parallelbuiltin/submodule--helper.c+119 -620 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCHv1 00/12] git submodule update in C with parallel cloning

So eventually we want to have projects with lots of submodules such as Android (which would have O(1000) submodules).

The very first thing a user does is cloning a project, so we want to impress with speed there as well. git clone however is lazy and just calls git submodule update --init --recursive. So we need to make that fast.

This series rewrites parts of git submodule update in C and in the second-last patch it separates cloning and doing the other actions(checkout/rebase/merge etc) by doing the cloning first and then the rest.

The last patch (which is broken in the first version of the series), then proceeds to put the cloning of the submodules into the get_next_task callback of the parallel process API.

That said, the first few patches introduce some churn in the behavior and tests of Git, so maybe put your eyes there?

Thanks for any advice,
Stefan

Stefan Beller (12):
git submodule update: Announce skipping submodules on stderr git submodule update: Announce uninitialized modules on stderr git submodule update: Move branch calculation to where it's needed git submodule update: Announce outcome of submodule operation to
stderr
git submodule update: Use its own list implementation. git submodule update: Handle unmerged submodules in C submodule config: keep update strategy around
git submodule update: check for "none" in C
git submodule update: Check url in C
git submodule update: Clone projects from within C
submodule--helper: Do not emit submodules to process directly. WIP/broken Clone all outstanding submodules in parallel

 builtin/submodule--helper.c | 221 ++++++++++++++++++++++++++++++++++++++++++++
 git-submodule.sh            |  38 +++-----
 submodule-config.c          |  11 +++
 submodule-config.h          |   1 +
 t/t7400-submodule-basic.sh  |  12 +--
 t/t7406-submodule-update.sh |  12 +--
 6 files changed, 256 insertions(+), 39 deletions(-)
Signature · 1 line
2.5.0.277.gfdc362b.dirty