Re: [PATCH v4 3/3] submodule--helper: introduce add-config subcommand
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jun 14, 2021, 20:12 UTC
- Message-ID
- <CAPig+cQQXEU2QvP6PGB7v=RGQDiu_s0kctFyqSHWvLe2ep0w9Q@mail.gmail.com>
- In-Reply-To
- <gohp6kh7i0xm08.fsf@cpm12071.fritz.box>
On Mon, Jun 14, 2021 at 3:53 PM Rafael Silva <rafaeloliveira.cs@gmail.com> wrote:
Show 11 quoted lines
> 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.