Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes: > From: Atharva Raykar <raykar.ath@xxxxxxxxx> > > This patch completes the conversion past the flag parsing of > `submodule update` by introducing a helper subcommand called > `submodule--helper update`. The behaviour of `submodule update` should > remain the same after this patch. > > We add more fields to the `struct update_data` that are required by > `struct submodule_update_clone` to be able to perform a clone, when that > is needed to be done. > > Recursing on a submodule is done by calling a subprocess that launches > `submodule--helper update`, with a modified `--recursive-prefix` and > `--prefix` parameter. > > We also introduce `update_submodules2()` and `update_submodule2()` > which will supersede `update_submodules()` and `update_submodule()`. > > When the `--init` flag is passed to the subcommand, we do not spawn a > new subprocess and call `submodule--helper init` on the submodule paths, > because the Git machinery is not able to pick up the configuration > changes introduced by that init call[1]. So we instead run the > `init_submodule_cb()` callback over each submodule in the same process. > > While we are at it, we also remove the fetch_in_submodule() shell > function since it is no longer used anywhere. > > [1] https://lore.kernel.org/git/CAP8UFD0NCQ5w_3GtT_xHr35i7h8BuLX4UcHNY6VHPGREmDVObA@xxxxxxxxxxxxxx/ > > Mentored-by: Christian Couder <christian.couder@xxxxxxxxx> > Mentored-by: Shourya Shukla <periperidip@xxxxxxxxx> > Signed-off-by: Atharva Raykar <raykar.ath@xxxxxxxxx> > Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> > Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> > --- I've read through all of the patches besides this one - I hope to get through this one soon. The diff is quite large, but I can't think of any way to shrink it down at the moment.