refs: plumb repo into ref stores
In preparation for the next 2 patches that adds (partial) support for arbitrary repositories to ref iterators, plumb a repository into all ref stores. There are no changes to program logic. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b6b210c5e1
commit
34224e14d6
@ -193,13 +193,15 @@ static int release_snapshot(struct snapshot *snapshot)
|
||||
}
|
||||
}
|
||||
|
||||
struct ref_store *packed_ref_store_create(const char *path,
|
||||
struct ref_store *packed_ref_store_create(struct repository *repo,
|
||||
const char *path,
|
||||
unsigned int store_flags)
|
||||
{
|
||||
struct packed_ref_store *refs = xcalloc(1, sizeof(*refs));
|
||||
struct ref_store *ref_store = (struct ref_store *)refs;
|
||||
|
||||
base_ref_store_init(ref_store, &refs_be_packed);
|
||||
ref_store->repo = repo;
|
||||
ref_store->gitdir = xstrdup(path);
|
||||
refs->store_flags = store_flags;
|
||||
|
||||
|
Reference in New Issue
Block a user