server-info: stop using the_repository

Stop using `the_repository` in the "server-info" subsystem by passing in
a repository when updating server info and storing the repository in the
`update_info_ctx` structure to make it accessible to other functions.

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:53 +01:00
committed by Junio C Hamano
parent 5ee907bb3f
commit c365dbb44e
5 changed files with 28 additions and 22 deletions

View File

@@ -2628,7 +2628,7 @@ int cmd_receive_pack(int argc,
}
}
if (auto_update_server_info)
update_server_info(0);
update_server_info(the_repository, 0);
clear_shallow_info(&si);
}
if (use_sideband)