On Wed, Oct 28, 2015 at 7:21 PM, Stefan Beller <sbeller@xxxxxxxxxx> wrote: > We need the submodule update strategies in a later patch. > > Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx> > Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> > --- > 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); -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html