serve: stop using the_repository

Stop using `the_repository` in the "serve" subsystem by passing in a
repository when advertising capabilities or serving requests.

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:51 +01:00
committed by Junio C Hamano
parent bd0c0fb790
commit 395b584b57
4 changed files with 30 additions and 25 deletions

View File

@ -1,7 +1,9 @@
#ifndef SERVE_H
#define SERVE_H
void protocol_v2_advertise_capabilities(void);
void protocol_v2_serve_loop(int stateless_rpc);
struct repository;
void protocol_v2_advertise_capabilities(struct repository *r);
void protocol_v2_serve_loop(struct repository *r, int stateless_rpc);
#endif /* SERVE_H */