]> git.99rst.org Git - git.git/commit
submodule--helper: introduce add-config subcommand
authorAtharva Raykar <redacted>
Fri, 6 Aug 2021 14:04:31 +0000 (19:34 +0530)
committerJunio C Hamano <redacted>
Tue, 10 Aug 2021 17:57:57 +0000 (10:57 -0700)
commita452128a36cb73f5366c23eabe93c7edfa227866
treeffad56bf1145c48e1bd64c73a2d642df972745ad
parentbbe3165f825c8d9b6e4a6747a287147b4583c3c1
submodule--helper: introduce add-config subcommand

Add a new "add-config" subcommand to `git submodule--helper` with the
goal of converting part of the shell code in git-submodule.sh related to
`git submodule add` into C code. This new subcommand sets the
configuration variables of a newly added submodule, by registering the
url in local git config, as well as the submodule name and path in the
.gitmodules file. It also sets 'submodule.<name>.active' to "true" if
the submodule path has not already been covered by any pathspec
specified in 'submodule.active'.

This is meant to be a faithful conversion from shell to C, although we
add comments to areas that could be improved in future patches, after
the conversion has settled.

Signed-off-by: Atharva Raykar <redacted>
Mentored-by: Christian Couder <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
submodule.c
git clone https://git.99rst.org/PROJECT