]> git.99rst.org Git - git.git/commit
submodule--helper: run update procedures from C
authorAtharva Raykar <redacted>
Tue, 24 Aug 2021 14:06:09 +0000 (19:36 +0530)
committerJunio C Hamano <redacted>
Tue, 24 Aug 2021 21:03:58 +0000 (14:03 -0700)
commitc51f8f94e5b3d6a8d190d9901ea0c5b83e30c3aa
tree8af8b5b6ea59bfbf0d1d9b70bcee8eeba2b06877
parent5d213e46bb7b880238ff5ea3914e940a50ae9369
submodule--helper: run update procedures from C

Add a new submodule--helper subcommand `run-update-procedure` that runs
the update procedure if the SHA1 of the submodule does not match what
the superproject expects.

This is an intermediate change that works towards total conversion of
`submodule update` from shell to C.

Specific error codes are returned so that the shell script calling the
subcommand can take a decision on the control flow, and preserve the
error messages across subsequent recursive calls of `cmd_update`.

This change is more focused on doing a faithful conversion, so for now we
are not too concerned with trying to reduce subprocess spawns.

Mentored-by: Christian Couder <redacted>
Mentored-by: Shourya Shukla <redacted>
Signed-off-by: Atharva Raykar <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/submodule--helper.c
git-submodule.sh
git clone https://git.99rst.org/PROJECT