Skip to content

Commit fbfd0a2

Browse files
mhaggergitster
authored andcommitted
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 <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 32c597e commit fbfd0a2

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

refs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,8 +1477,7 @@ struct ref_store *get_ref_store(const char *submodule)
14771477
}
14781478

14791479
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)
14821481
{
14831482
refs->be = be;
14841483
}

refs/files-backend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ static struct ref_store *files_ref_store_create(const char *submodule)
980980
struct files_ref_store *refs = xcalloc(1, sizeof(*refs));
981981
struct ref_store *ref_store = (struct ref_store *)refs;
982982

983-
base_ref_store_init(ref_store, &refs_be_files, submodule);
983+
base_ref_store_init(ref_store, &refs_be_files);
984984

985985
refs->submodule = submodule ? xstrdup(submodule) : "";
986986

refs/refs-internal.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,12 +632,11 @@ struct ref_store {
632632
};
633633

634634
/*
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.
637637
*/
638638
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);
641640

642641
/*
643642
* Return the ref_store instance for the specified submodule. For the

0 commit comments

Comments
 (0)