diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2021-10-08 14:08:14 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-08 15:06:05 -0700 |
commit | 34224e14d6b50cb04430188332362e6a0327e5ed (patch) | |
tree | d5a67a9029c464284d01ef8bba1bf7b2251e9509 /refs/refs-internal.h | |
parent | Merge branch 'jk/ref-paranoia' into jt/no-abuse-alternate-odb-for-submodules (diff) | |
download | tgif-34224e14d6b50cb04430188332362e6a0327e5ed.tar.xz |
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>
Diffstat (limited to 'refs/refs-internal.h')
-rw-r--r-- | refs/refs-internal.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h index 96911fb26e..d28440c9cc 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@ -539,7 +539,8 @@ struct ref_store; * should call base_ref_store_init() to initialize the shared part of * the ref_store and to record the ref_store for later lookup. */ -typedef struct ref_store *ref_store_init_fn(const char *gitdir, +typedef struct ref_store *ref_store_init_fn(struct repository *repo, + const char *gitdir, unsigned int flags); typedef int ref_init_db_fn(struct ref_store *refs, struct strbuf *err); @@ -697,7 +698,12 @@ struct ref_store { /* The backend describing this ref_store's storage scheme: */ const struct ref_storage_be *be; - /* The gitdir that this ref_store applies to: */ + struct repository *repo; + + /* + * The gitdir that this ref_store applies to. Note that this is not + * necessarily repo->gitdir if the repo has multiple worktrees. + */ char *gitdir; }; |