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 <redacted>
---
Like I mentioned before, I'm lukewarm on this one, because I doubt
anybody actually uses this debugging information. If we drop it, it
makes sense to drop 3/4, too, which is just infrastructure for this.
builtin/fetch-pack.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index bc7a0f9..bfe31ee 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -823,8 +823,14 @@ 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 (server_supports("agent")) {
agent_supported = 1;
+ if (args.verbose) {
+ char *v = server_feature_value("agent");
+ fprintf(stderr, "Server version is %s\n", v);
+ free(v);
+ }
+ }
if (everything_local(&ref, nr_match, match)) {
packet_flush(fd[1]);--
1.7.12.rc2.4.g7f05cf9