summaryrefslogtreecommitdiffstats
path: root/midx.h
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2024-11-27 17:28:31 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-04 02:32:20 +0100
commitd5c2ca576a47480b03a83821041955a21a645d1a (patch)
treed8e709ce0b75c38af0ec27899b0c4ea0f1c3ea89 /midx.h
parentmidx: cleanup internal usage of `the_repository` and `the_hash_algo` (diff)
downloadgit-d5c2ca576a47480b03a83821041955a21a645d1a.tar.xz
git-d5c2ca576a47480b03a83821041955a21a645d1a.zip
midx: pass `repository` to `load_multi_pack_index`
The `load_multi_pack_index` function in midx uses `the_repository` variable to access the `repository` struct. Modify the function and its callee's to send the `repository` field. This moves usage of `the_repository` to the `test-read-midx.c` file. While that is not optimal, it is okay, since the upcoming commits will slowly move the usage of `the_repository` up the layers and remove it eventually. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'midx.h')
-rw-r--r--midx.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/midx.h b/midx.h
index c37ad5b524..78efa28d35 100644
--- a/midx.h
+++ b/midx.h
@@ -97,7 +97,9 @@ void get_midx_chain_filename(struct strbuf *buf, const char *object_dir);
void get_split_midx_filename_ext(struct strbuf *buf, const char *object_dir,
const unsigned char *hash, const char *ext);
-struct multi_pack_index *load_multi_pack_index(const char *object_dir, int local);
+struct multi_pack_index *load_multi_pack_index(struct repository *r,
+ const char *object_dir,
+ int local);
int prepare_midx_pack(struct repository *r, struct multi_pack_index *m, uint32_t pack_int_id);
struct packed_git *nth_midxed_pack(struct multi_pack_index *m,
uint32_t pack_int_id);