summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-08-29 21:50:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-08-29 21:50:07 (GMT)
commit97349a2a74fdd42afd5a1f8e8e92cddf47f28193 (patch)
tree1bf6c7e35ff92704b01e56fcbd356eca19bd2585 /builtin/receive-pack.c
parent4514de70c2e006f6b817498bf941d2b789feaaa7 (diff)
parent36c60f7a08b28e2cee649d697291ac6b708b213f (diff)
downloadgit-97349a2a74fdd42afd5a1f8e8e92cddf47f28193.zip
git-97349a2a74fdd42afd5a1f8e8e92cddf47f28193.tar.gz
git-97349a2a74fdd42afd5a1f8e8e92cddf47f28193.tar.bz2
Merge branch 'jc/capabilities'
Some capabilities were asked by fetch-pack even when upload-pack did not advertise that they are available. Fix fetch-pack not to do so. * jc/capabilities: fetch-pack: mention server version with verbose output parse_feature_request: make it easier to see feature values fetch-pack: do not ask for unadvertised capabilities do not send client agent unless server does first send-pack: fix capability-sending logic include agent identifier in capability string
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 3f05d97..2cb854f 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -12,6 +12,7 @@
#include "string-list.h"
#include "sha1-array.h"
#include "connected.h"
+#include "version.h"
static const char receive_pack_usage[] = "git receive-pack <git-dir>";
@@ -121,10 +122,11 @@ static void show_ref(const char *path, const unsigned char *sha1)
if (sent_capabilities)
packet_write(1, "%s %s\n", sha1_to_hex(sha1), path);
else
- packet_write(1, "%s %s%c%s%s\n",
+ packet_write(1, "%s %s%c%s%s agent=%s\n",
sha1_to_hex(sha1), path, 0,
" report-status delete-refs side-band-64k quiet",
- prefer_ofs_delta ? " ofs-delta" : "");
+ prefer_ofs_delta ? " ofs-delta" : "",
+ git_user_agent_sanitized());
sent_capabilities = 1;
}