send-pack: stop using the_repository

Stop using `the_repository` in the "send-pack" subsystem by passing in a
repository when sending a packfile.

Adjust callers accordingly by using `the_repository`. While there may be
some callers that have a repository available in their context, this
trivial conversion allows for easier verification and bubbles up the use
of `the_repository` by one level.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-12-17 07:43:52 +01:00
committed by Junio C Hamano
parent 395b584b57
commit 5ee907bb3f
4 changed files with 44 additions and 40 deletions

View File

@ -317,7 +317,7 @@ int cmd_send_pack(int argc,
set_ref_status_for_push(remote_refs, args.send_mirror,
args.force_update);
ret = send_pack(&args, fd, conn, remote_refs, &extra_have);
ret = send_pack(the_repository, &args, fd, conn, remote_refs, &extra_have);
if (helper_status)
print_helper_status(remote_refs);