[GSoC] [PATCH v6 0/3] submodule--helper: introduce subcommands for sh to C conversion
From: Atharva Raykar <hidden>
Date: 2021-06-15 14:58:04
In [2/3]:
I noticed that my previous code fails to parse prefixes properly when it has not
been explicitly stated by the subcommand caller.
Atharva Raykar (3):
submodule--helper: refactor module_clone()
submodule--helper: introduce add-clone subcommand
submodule--helper: introduce add-config subcommand
builtin/submodule--helper.c | 543 ++++++++++++++++++++++++++++--------
git-submodule.sh | 66 +----
2 files changed, 432 insertions(+), 177 deletions(-)
Range-diff against v5:
1: 068568f997 = 1: 068568f997 submodule--helper: refactor module_clone()
1: 10734cf91a ! 2: 06b2075580 submodule--helper: introduce add-clone subcommand
@@ builtin/submodule--helper.c: static int module_set_branch(int argc, const char *
+ OPT_STRING('b', "branch", &add_data.branch,
+ N_("branch"),
+ N_("branch of repository to checkout on cloning")),
-+ OPT_STRING(0, "prefix", &add_data.prefix,
++ OPT_STRING(0, "prefix", &prefix,
+ N_("path"),
+ N_("alternative anchor for relative paths")),
+ OPT_STRING(0, "path", &add_data.sm_path,
@@ builtin/submodule--helper.c: static int module_set_branch(int argc, const char *
+ if (argc != 0)
+ usage_with_options(usage, options);
+
++ add_data.prefix = prefix;
+ add_data.progress = !!progress;
+ add_data.dissociate = !!dissociate;
+ add_data.force = !!force;
2: 383f0b6217 = 3: 3e827a3858 submodule--helper: introduce add-config subcommand
--
2.31.1