From: Michael Haggerty Date: Fri, 10 Feb 2017 11:16:17 +0000 (+0100) Subject: base_ref_store_init(): remove submodule argument X-Git-Tag: v2.13.0-rc0~166^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/fbfd0a291596a698773d3f687af3ab4c36a841bf?ds=inline;hp=--cc base_ref_store_init(): remove submodule argument This is another step towards weakening the 1:1 relationship between ref_stores and submodules. Signed-off-by: Michael Haggerty Reviewed-by: Jeff King Signed-off-by: Junio C Hamano --- fbfd0a291596a698773d3f687af3ab4c36a841bf diff --git a/refs.c b/refs.c index 07959ff3e6..05af56b50a 100644 --- a/refs.c +++ b/refs.c @@ -1477,8 +1477,7 @@ struct ref_store *get_ref_store(const char *submodule) } void base_ref_store_init(struct ref_store *refs, - const struct ref_storage_be *be, - const char *submodule) + const struct ref_storage_be *be) { refs->be = be; } diff --git a/refs/files-backend.c b/refs/files-backend.c index 5e135a49aa..c9d2d28488 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -980,7 +980,7 @@ static struct ref_store *files_ref_store_create(const char *submodule) struct files_ref_store *refs = xcalloc(1, sizeof(*refs)); struct ref_store *ref_store = (struct ref_store *)refs; - base_ref_store_init(ref_store, &refs_be_files, submodule); + base_ref_store_init(ref_store, &refs_be_files); refs->submodule = submodule ? xstrdup(submodule) : ""; diff --git a/refs/refs-internal.h b/refs/refs-internal.h index 008822d67c..793c850e98 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@ -632,12 +632,11 @@ struct ref_store { }; /* - * Fill in the generic part of refs for the specified submodule and - * add it to our collection of reference stores. + * Fill in the generic part of refs and add it to our collection of + * reference stores. */ void base_ref_store_init(struct ref_store *refs, - const struct ref_storage_be *be, - const char *submodule); + const struct ref_storage_be *be); /* * Return the ref_store instance for the specified submodule. For the