summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-08-10 07:57:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-08-10 19:26:42 (GMT)
commitca8e127c9bd65b07a565ca00aff8e0a48628bfc3 (patch)
treef1df6a532c75a14777d0887a39cc672b63a3b4d5 /git.c
parentff5effdf455bd6e694ff0bb3e0793515a2214adb (diff)
downloadgit-ca8e127c9bd65b07a565ca00aff8e0a48628bfc3.zip
git-ca8e127c9bd65b07a565ca00aff8e0a48628bfc3.tar.gz
git-ca8e127c9bd65b07a565ca00aff8e0a48628bfc3.tar.bz2
send-pack: fix capability-sending logic
If we have capabilities to send to the server, we send the regular "want" line followed by a NUL, then the capabilities; otherwise, we do not even send the NUL. However, when checking whether we want to send the "quiet" capability, we check args->quiet, which is wrong. That flag only tells us whether the client side wanted to be quiet, not whether the server supports it (originally, in c207e34f, it meant both; however, that was later split into two flags by 01fdc21f). We still check the right flag when actually printing "quiet", so this could only have two effects: 1. We might send the trailing NUL when we do not otherwise need to. In theory, an antique pre-capability implementation of git might choke on this (since the client is instructed never to respond with capabilities that the server has not first advertised). 2. We might also want to send the quiet flag if the args->progress flag is false, but this code path would not trigger in that instance. In practice, it almost certainly never matters. The report-status capability dates back to 2005. Any real-world server is going to advertise that, and we will always respond with at least that capability. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
0 files changed, 0 insertions, 0 deletions