]> git.ipfire.org Git - thirdparty/git.git/commit
submodule--helper: convert the bulk of cmd_add() to C
authorAtharva Raykar <raykar.ath@gmail.com>
Tue, 10 Aug 2021 11:46:37 +0000 (17:16 +0530)
committerJunio C Hamano <gitster@pobox.com>
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 <raykar.ath@gmail.com>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Helped-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Mentored-by: Shourya Shukla <periperidip@gmail.com>
Based-on-patch-by: Shourya Shukla <periperidip@gmail.com>
Based-on-patch-by: Prathamesh Chavan <pc44800@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c
git-submodule.sh