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>
Michael Haggerty committed
Feb 10, 2017 at 12:16 UTC
fbfd0a291596a698773d3f687af3ab4c36a841bf
3 files changed
+5
-7
refs.c
+1
-2
@@ -1477,8 +1477,7 @@ struct ref_store *get_ref_store(const char *submodule)
1477
}
1478
1479
void base_ref_store_init(struct ref_store *refs,
1480
- const struct ref_storage_be *be,
1481
- const char *submodule)
1480
+ const struct ref_storage_be *be)
1481
{
1482
refs->be = be;
1483
}
refs/files-backend.c
+1
-1
@@ -980,7 +980,7 @@ static struct ref_store *files_ref_store_create(const char *submodule)
980
struct files_ref_store *refs = xcalloc(1, sizeof(*refs));
981
struct ref_store *ref_store = (struct ref_store *)refs;
982
983
- base_ref_store_init(ref_store, &refs_be_files, submodule);
983
+ base_ref_store_init(ref_store, &refs_be_files);
984
985
refs->submodule = submodule ? xstrdup(submodule) : "";
986
refs/refs-internal.h
+3
-4
@@ -632,12 +632,11 @@ struct ref_store {
632
};
633
634
/*
635
- * Fill in the generic part of refs for the specified submodule and
636
- * add it to our collection of reference stores.
635
+ * Fill in the generic part of refs and add it to our collection of
636
+ * reference stores.
637
*/
638
void base_ref_store_init(struct ref_store *refs,
639
- const struct ref_storage_be *be,
640
- const char *submodule);
639
+ const struct ref_storage_be *be);
640
641
/*
642
* Return the ref_store instance for the specified submodule. For the