Original series: https://lore.kernel.org/git/20220210092833.55360-1-chooglen@xxxxxxxxxx "git submodule update" in C part 1: https://lore.kernel.org/git/20220301000816.56177-1-chooglen@xxxxxxxxxx/ Based off 'gc/submodule-update-part-1'. = Overview This is part 2 of 2 series that supersedes ar/submodule-update. This finishes the conversion of "git submodule update" to C by: - combining the constituent "git submodule--helper" commands ("update-clone" and "run-update-procedure") to create "git submodule--helper update" - converting the --recursive flag to C by teaching "git submodule--helper update" to invoke itself This also fixes a test failure that Junio noted in https://lore.kernel.org/git/xmqqr18770pc.fsf@gitster.g (see patch 6 for more details). = Known conflicts This series is missing some functionality introduced in the in-flight es/superproject-aware-submodules [1], namely, that "git submodule update" sets `submodule.hasSuperproject` on all submodules. I intended for this to go _after_ es/superproject-aware-submodules, and in that series, Emily and I tried to simplify this conflict by preemptively doing this in C (see that series' v9 cover letter [1]). That discussion is still ongoing, but it seems helpful to send this series anyway (thanks to all who weighed in over IRC [2]). At any rate, neither series really depends on the other, so this series is still independently reviewable, but with the caveat that I may add another patch that adds the missing behavior (it will probably look something like [3]). Alternatively, this series might graduate first. In which case, I'll continue working with Emily to fix the conflict. = Patch organization This series largely follows the remaining ar/submodule-update patches that weren't included in part 1 and some additional clean ups. One notable difference vis-a-vis ar/submodule-update is that the CLI args for "update-clone" are no longer copied across structs (see patch 4 for more details). - Patches 1-2 teaches "run-update-procedure" to exit and report its failures in a more idiomatic manner instead of relying on git-submodule.sh. - Patches 3-4 prepare for "run-update-procedure" and "update-clone"'s args to be merged into a single struct. - Patches 5-6 finish the process of implementing `submodule--helper update`. - Patch 7 cleans up a forward declaration that kept the diffs small while we were in the process of conversion, but is no longer needed. [1] https://lore.kernel.org/git/20220310004423.2627181-1-emilyshaffer@xxxxxxxxxx [2] https://colabti.org/irclogger/irclogger_log/git-devel?date=2022-03-14 [3] https://lore.kernel.org/git/kl6l1qz9s6tu.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Atharva Raykar (2): submodule--helper: run update using child process struct submodule: move core cmd_update() logic to C Glen Choo (4): submodule update: use die_message() submodule--helper: teach update_data more options submodule--helper: reduce logic in run_update_procedure() submodule--helper: remove forward declaration Ævar Arnfjörð Bjarmason (1): builtin/submodule--helper.c: rename option struct to "opt" builtin/submodule--helper.c | 691 ++++++++++++++++++------------------ git-submodule.sh | 105 +----- 2 files changed, 361 insertions(+), 435 deletions(-) base-commit: c9d256249375c7b8a1773139791448860b5789ff -- 2.33.GIT