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 <mhagger@alum.mit.edu> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
32c597e7b2
commit
fbfd0a2915
3
refs.c
3
refs.c
|
@ -1477,8 +1477,7 @@ struct ref_store *get_ref_store(const char *submodule)
|
||||||
}
|
}
|
||||||
|
|
||||||
void base_ref_store_init(struct ref_store *refs,
|
void base_ref_store_init(struct ref_store *refs,
|
||||||
const struct ref_storage_be *be,
|
const struct ref_storage_be *be)
|
||||||
const char *submodule)
|
|
||||||
{
|
{
|
||||||
refs->be = be;
|
refs->be = be;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 files_ref_store *refs = xcalloc(1, sizeof(*refs));
|
||||||
struct ref_store *ref_store = (struct ref_store *)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) : "";
|
refs->submodule = submodule ? xstrdup(submodule) : "";
|
||||||
|
|
||||||
|
|
|
@ -632,12 +632,11 @@ struct ref_store {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fill in the generic part of refs for the specified submodule and
|
* Fill in the generic part of refs and add it to our collection of
|
||||||
* add it to our collection of reference stores.
|
* reference stores.
|
||||||
*/
|
*/
|
||||||
void base_ref_store_init(struct ref_store *refs,
|
void base_ref_store_init(struct ref_store *refs,
|
||||||
const struct ref_storage_be *be,
|
const struct ref_storage_be *be);
|
||||||
const char *submodule);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the ref_store instance for the specified submodule. For the
|
* Return the ref_store instance for the specified submodule. For the
|
||||||
|
|
Loading…
Reference in New Issue