aboutsummaryrefslogtreecommitdiff
path: root/builtin/fetch-pack.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-08-13 22:02:10 -0400
committerJunio C Hamano <gitster@pobox.com>2012-08-13 21:56:05 -0700
commit36c60f7a08b28e2cee649d697291ac6b708b213f (patch)
tree825c59a8668a409b98dded4113dbf72784acc367 /builtin/fetch-pack.c
parent9442710801b0b7b9aeefe60408d1835af138cfcc (diff)
downloadgit-36c60f7a08b28e2cee649d697291ac6b708b213f.tar.gz
git-36c60f7a08b28e2cee649d697291ac6b708b213f.tar.xz
fetch-pack: mention server version with verbose output
Fetch-pack's verbose mode is more of a debugging mode (and in fact takes two "-v" arguments to trigger via the porcelain layer). Let's mention the server version as another possible item of interest. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fetch-pack.c')
-rw-r--r--builtin/fetch-pack.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index fdec7f61c..fdda36f14 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -787,6 +787,8 @@ static struct ref *do_fetch_pack(int fd[2],
{
struct ref *ref = copy_ref_list(orig_ref);
unsigned char sha1[20];
+ const char *agent_feature;
+ int agent_len;
sort_ref_list(&ref, ref_compare_name);
@@ -829,8 +831,13 @@ static struct ref *do_fetch_pack(int fd[2],
fprintf(stderr, "Server supports ofs-delta\n");
} else
prefer_ofs_delta = 0;
- if (server_supports("agent"))
+
+ if ((agent_feature = server_feature_value("agent", &agent_len))) {
agent_supported = 1;
+ if (args.verbose && agent_len)
+ fprintf(stderr, "Server version is %.*s\n",
+ agent_len, agent_feature);
+ }
if (everything_local(&ref, nr_match, match)) {
packet_flush(fd[1]);