Re: [PATCH v4 1/3] submodule--helper: refactor module_clone()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 15, 2021, 03:51 UTC
- Message-ID
- <xmqqzgvrwzsv.fsf@gitster.g>
- In-Reply-To
- <20210614125157.99426-2-raykar.ath@gmail.com>
Atharva Raykar <raykar.ath@gmail.com> writes:
Show 5 quoted lines
> Separate out the core logic of module_clone() from the flag > parsing---this way we can call the equivalent of the `submodule--helper > clone` subcommand directly within C, without needing to push arguments > in a strvec. > ---
Missing sign-off?
Show 11 quoted lines
> builtin/submodule--helper.c | 241 +++++++++++++++++++----------------- > 1 file changed, 128 insertions(+), 113 deletions(-) > > diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c > index d55f6262e9..321b623d81 100644 > --- a/builtin/submodule--helper.c > +++ b/builtin/submodule--helper.c > @@ -1658,45 +1658,20 @@ static int module_deinit(int argc, const char **argv, const char *prefix) > return 0; > } >
> +struct module_clone_data {
> + const char* prefix;Asterisk sticks to identifier not type in this codebase, i.e.
const char *prefix;
Other than that, the split makes sense, especially for the purpose of more easily reusing this helper without having to unparse and reparse the option strings.