summaryrefslogtreecommitdiff
path: root/builtin/index-pack.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-03-10 08:13:22 +0100
committerJunio C Hamano <gitster@pobox.com>2025-03-10 13:16:18 -0700
commit2582846f2fe21b23fe7c567e030510960f135160 (patch)
tree1ccb5d1c219056c6c038b04be555500cb3aa3000 /builtin/index-pack.c
parent74d414c9f14a91a3b7bd04972bf3eb9bbe6fd81b (diff)
pack-write: stop depending on `the_repository` and `the_hash_algo`
There are a couple of functions in "pack-write.c" that implicitly depend on `the_repository` or `the_hash_algo`. Remove this dependency by injecting the repository via a parameter and adapt callers accordingly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/index-pack.c')
-rw-r--r--builtin/index-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 1268032d76..174e03afa6 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -2088,10 +2088,10 @@ int cmd_index_pack(int argc,
ALLOC_ARRAY(idx_objects, nr_objects);
for (i = 0; i < nr_objects; i++)
idx_objects[i] = &objects[i].idx;
- curr_index = write_idx_file(the_hash_algo, index_name, idx_objects,
+ curr_index = write_idx_file(the_repository, index_name, idx_objects,
nr_objects, &opts, pack_hash);
if (rev_index)
- curr_rev_index = write_rev_file(the_hash_algo, rev_index_name,
+ curr_rev_index = write_rev_file(the_repository, rev_index_name,
idx_objects, nr_objects,
pack_hash, opts.flags);
free(idx_objects);