submodule--helper: introduce add-clone subcommand
commit8c8195e9c3e21922673575828977845b613c3491
authorAtharva Raykar <raykar.ath@gmail.com>
Sat, 10 Jul 2021 07:48:01 +0000 (10 13:18 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Jul 2021 19:06:21 +0000 (12 12:06 -0700)
tree88986fff122a27a99b1e38dc5c5dc40c10b44db4
parenta98b02c11289879868dd0d5f80e894d8d01dc73b
submodule--helper: introduce add-clone subcommand

Let's add a new "add-clone" 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 clones
the repository that is to be added, and checks out to the appropriate
branch.

This is meant to be a faithful conversion that leaves the behaviour of
'cmd_add()' script unchanged.

Signed-off-by: Atharva Raykar <raykar.ath@gmail.com>
Mentored-by: Christian Couder <christian.couder@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>
Helped-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c
git-submodule.sh