summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2024-02-28 17:50:50 -0500
committerJunio C Hamano <gitster@pobox.com>2024-02-29 08:10:42 -0800
commita922bfa3b5a6b2ac5e98f0e3405d66c1847aa7e8 (patch)
treed494eb2b5d80e3d26de8afd813b5780464c89019 /builtin/commit.c
parent9a7b22959ad078df1f50d15e86a169aaebfb8c4c (diff)
upload-pack: only accept packfile-uris if we advertised it
Clients are only supposed to request particular capabilities or features if the server advertised them. For the "packfile-uris" feature, we only advertise it if uploadpack.blobpacfileuri is set, but we always accept a request from the client regardless. In practice this doesn't really hurt anything, as we'd pass the client's protocol list on to pack-objects, which ends up ignoring it. But we should try to follow the protocol spec, and tightening this up may catch buggy or misbehaving clients more easily. Thanks to recent refactoring, we can hoist the config check from upload_pack_advertise() into upload_pack_config(). Note the subtle handling of a value-less bool (which does not count for triggering an advertisement). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions