upload-pack: use repository struct to get config
commit922fdefb84c4341c0bb10f3ca090725f9fcc8bcb
authorJeff King <peff@peff.net>
Wed, 28 Feb 2024 22:46:47 +0000 (28 17:46 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Feb 2024 22:48:35 +0000 (28 14:48 -0800)
tree3dd2829caa24a5fe301b49e2f271c8f064617a02
parent3c2a3fdc388747b9eaf4a4a4f2035c1c9ddb26d0
upload-pack: use repository struct to get config

Our upload_pack_v2() function gets a repository struct, but we ignore it
totally.  In practice this doesn't cause any problems, as it will never
differ from the_repository. But in the spirit of taking a small step
towards getting rid of the_repository, let's at least starting using it
to grab config. There are probably other spots that could benefit, but
it's a start.

Note that we don't need to pass the repo for protected_config(); the
whole point there is that we are not looking at repo config, so there is
no repo-specific version of the function.

For the v0 version of the protocol, we're not passed a repository
struct, so we'll continue to use the_repository there.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
upload-pack.c