]> git.ipfire.org Git - thirdparty/git.git/commit - upload-pack.c
upload-pack: centralize setup of sideband-all config
authorJeff King <peff@peff.net>
Wed, 28 Feb 2024 22:47:18 +0000 (17:47 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Feb 2024 23:30:41 +0000 (15:30 -0800)
commit37aa89b068810d4ed7f262adcfecca1e07cf553c
tree94412d2f4ba566291a947e0005a1f86afb0c0040
parent922fdefb84c4341c0bb10f3ca090725f9fcc8bcb
upload-pack: centralize setup of sideband-all config

We read uploadpack.allowsidebandall to set a matching flag in our
upload_pack_data struct. But for our tests, we also respect
GIT_TEST_SIDEBAND_ALL from the environment, and anybody looking at the
flag in the struct needs to remember to check both. There's only one
such piece of code now, but we're about to add another.

So let's have the config step actually fold the environment value into
the struct, letting the rest of the code use the flag in the obvious
way.

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