aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper/test-read-midx.c
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 10:32:20 +0900
commitd5c2ca576a47480b03a83821041955a21a645d1a (patch)
treed8e709ce0b75c38af0ec27899b0c4ea0f1c3ea89 /t/helper/test-read-midx.c
parentfae9bae7091958255fa7729f6cedb8cc4f9a3387 (diff)
downloadgit-d5c2ca576a47480b03a83821041955a21a645d1a.tar.gz
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 't/helper/test-read-midx.c')
-rw-r--r--t/helper/test-read-midx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/helper/test-read-midx.c b/t/helper/test-read-midx.c
index 438fb9fc61..fc63236961 100644
--- a/t/helper/test-read-midx.c
+++ b/t/helper/test-read-midx.c
@@ -18,7 +18,7 @@ static int read_midx_file(const char *object_dir, const char *checksum,
struct multi_pack_index *m;
setup_git_directory();
- m = load_multi_pack_index(object_dir, 1);
+ m = load_multi_pack_index(the_repository, object_dir, 1);
if (!m)
return 1;
@@ -82,7 +82,7 @@ static int read_midx_checksum(const char *object_dir)
struct multi_pack_index *m;
setup_git_directory();
- m = load_multi_pack_index(object_dir, 1);
+ m = load_multi_pack_index(the_repository, object_dir, 1);
if (!m)
return 1;
printf("%s\n", hash_to_hex(get_midx_checksum(m)));
@@ -98,7 +98,7 @@ static int read_midx_preferred_pack(const char *object_dir)
setup_git_directory();
- midx = load_multi_pack_index(object_dir, 1);
+ midx = load_multi_pack_index(the_repository, object_dir, 1);
if (!midx)
return 1;
@@ -121,7 +121,7 @@ static int read_midx_bitmapped_packs(const char *object_dir)
setup_git_directory();
- midx = load_multi_pack_index(object_dir, 1);
+ midx = load_multi_pack_index(the_repository, object_dir, 1);
if (!midx)
return 1;