]> git.99rst.org Git - git.git/commit
submodule--helper: convert the bulk of cmd_add() to C
authorAtharva Raykar <redacted>
Tue, 10 Aug 2021 11:46:37 +0000 (17:16 +0530)
committerJunio C Hamano <redacted>
Tue, 10 Aug 2021 18:45:11 +0000 (11:45 -0700)
commita6226fd772b1dfff87fa8dc040d97efa75a3721c
treee080c16a7af1c9ca343d0180f2dbbf81dcedca5f
parented86301f68fcbb17c5d1c7a3258e4705b3b1da9c
submodule--helper: convert the bulk of cmd_add() to C

Introduce the 'add' subcommand to `submodule--helper.c` that does all
the work 'submodule add' past the parsing of flags.

We also remove the constness of the sm_path field of the `add_data`
struct. This is needed so that it can be modified by
normalize_path_copy().

As with the previous conversions, this is meant to be a faithful
conversion with no modification to the behaviour of `submodule add`.

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