diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-12-17 07:43:51 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-18 10:44:30 -0800 |
| commit | 395b584b5751b009d657d8c3aed371f2a233d919 (patch) | |
| tree | c53b4f9175acf90a8ce96f6ec90348316e6da5ea /builtin/upload-pack.c | |
| parent | trace: stop using `the_repository` (diff) | |
| download | git-395b584b5751b009d657d8c3aed371f2a233d919.tar.gz git-395b584b5751b009d657d8c3aed371f2a233d919.zip | |
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>
Diffstat (limited to 'builtin/upload-pack.c')
| -rw-r--r-- | builtin/upload-pack.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/upload-pack.c b/builtin/upload-pack.c index dd63d6eadf..c2bbc035ab 100644 --- a/builtin/upload-pack.c +++ b/builtin/upload-pack.c @@ -1,3 +1,5 @@ +#define USE_THE_REPOSITORY_VARIABLE + #include "builtin.h" #include "exec-cmd.h" #include "gettext.h" @@ -63,9 +65,9 @@ int cmd_upload_pack(int argc, switch (determine_protocol_version_server()) { case protocol_v2: if (advertise_refs) - protocol_v2_advertise_capabilities(); + protocol_v2_advertise_capabilities(the_repository); else - protocol_v2_serve_loop(stateless_rpc); + protocol_v2_serve_loop(the_repository, stateless_rpc); break; case protocol_v1: /* |
