Re: [PATCH v2 16/21] refs: check submodules ref storage config
David Turner <dturner@twopensource.com> writes:
Show 22 quoted lines
> 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 <dturner@twopensource.com>
> ---
> 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).