From: Eric Sunshine Date: Mon, 14 Jun 2021 20:12:46 GMT Subject: Re: [PATCH v4 3/3] submodule--helper: introduce add-config subcommand Message-ID: In-Reply-To: On Mon, Jun 14, 2021 at 3:53 PM Rafael Silva wrote: > Just as an example, here's a diff to demonstrate the argument: > -- >8 -- > diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c > @@ -2934,6 +2934,14 @@ static int add_clone(int argc, const char **argv, const char *prefix) > +void add_config_in_submodules_file(const char *keyfmt, const char *submodule, > + const char *value) > +{ > + char *key = xstrfmt(keyfmt, submodule); > + config_set_in_gitmodules_file_gently(key, value); > + free(key); > +} The new function should be `static`, of course.