From: Eric Sunshine Date: Fri, 30 Oct 2015 01:14:22 GMT Subject: Re: [PATCHv2 2/8] submodule config: keep update strategy around Message-ID: In-Reply-To: <1446074504-6014-3-git-send-email-sbeller@google.com> On Wed, Oct 28, 2015 at 7:21 PM, Stefan Beller wrote: > We need the submodule update strategies in a later patch. > > Signed-off-by: Stefan Beller > Signed-off-by: Junio C Hamano > --- > diff --git a/submodule-config.c b/submodule-config.c > index afe0ea8..8b8c7d1 100644 > --- a/submodule-config.c > +++ b/submodule-config.c > @@ -311,6 +312,16 @@ static int parse_config(const char *var, const char *value, void *data) > free((void *) submodule->url); > submodule->url = xstrdup(value); > } > + } else if (!strcmp(item.buf, "update")) { > + if (!value) > + ret = config_error_nonbool(var); > + else if (!me->overwrite && submodule->update != NULL) Although "foo != NULL" is unusual in this code-base, it is used elsewhere in this file, including just outside the context seen above. Okay. > + warn_multiple_config(me->commit_sha1, submodule->name, > + "update"); > + else { > + free((void *)submodule->update); Minor: Every other 'free((void *) foo)' in this file has a space after "(void *)", one of which can be seen in the context just above. > + submodule->update = xstrdup(value); > + } > } > > strbuf_release(&name);