mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
74d414c9f1
commit
2582846f2f
@@ -658,7 +658,7 @@ static void write_midx_reverse_index(char *midx_name, unsigned char *midx_hash,
|
||||
strbuf_addf(&buf, "%s-%s.rev", midx_name, hash_to_hex_algop(midx_hash,
|
||||
ctx->repo->hash_algo));
|
||||
|
||||
tmp_file = write_rev_file_order(ctx->repo->hash_algo, NULL, ctx->pack_order,
|
||||
tmp_file = write_rev_file_order(ctx->repo, NULL, ctx->pack_order,
|
||||
ctx->entries_nr, midx_hash, WRITE_REV);
|
||||
|
||||
if (finalize_object_file(tmp_file, buf.buf))
|
||||
|
||||
Reference in New Issue
Block a user