From: Junio C Hamano Date: Wed, 13 Jan 2016 00:19:18 GMT Subject: Re: [PATCH v2 16/21] refs: check submodules ref storage config Message-ID: In-Reply-To: <1452561740-8668-17-git-send-email-dturner@twopensource.com> David Turner writes: > All submodules must have the same ref storage (for now). Confirm that > this is so before attempting to do anything with submodule refs. > > Signed-off-by: David Turner > --- > refs.c | 41 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 41 insertions(+) > > diff --git a/refs.c b/refs.c > index 07f1dab..1ccc7f6 100644 > --- a/refs.c > +++ b/refs.c > @@ -297,8 +297,43 @@ int for_each_tag_ref(each_ref_fn fn, void *cb_data) > return for_each_ref_in("refs/tags/", fn, cb_data); > } > > +static int submodule_backend(const char *key, const char *value, void *data) > +{ > + char **path = data; > + if (!strcmp(key, "extensions.refstorage")) > + *path = xstrdup(value); > +} This should return "int" (namely 0).