summaryrefslogtreecommitdiff
path: root/protocol.c
diff options
context:
space:
mode:
authorJosh Steadmon <steadmon@google.com>2021-08-10 17:20:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-08-10 18:46:33 (GMT)
commit626beebdf85a6ea5561dd8a0c912c9e9fb5622b4 (patch)
treef089829c7587db5dba975b9c17323e9a488f5902 /protocol.c
parent66262451ec94d30ac4b80eb3123549cf7a788afd (diff)
downloadgit-626beebdf85a6ea5561dd8a0c912c9e9fb5622b4.zip
git-626beebdf85a6ea5561dd8a0c912c9e9fb5622b4.tar.gz
git-626beebdf85a6ea5561dd8a0c912c9e9fb5622b4.tar.bz2
connect, protocol: log negotiated protocol version
It is useful for performance monitoring and debugging purposes to know the wire protocol used for remote operations. This may differ from the version set in local configuration due to differences in version and/or configuration between the server and the client. Therefore, log the negotiated wire protocol version via trace2, for both clients and servers. Signed-off-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'protocol.c')
-rw-r--r--protocol.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/protocol.c b/protocol.c
index 052d7ed..c53f7df 100644
--- a/protocol.c
+++ b/protocol.c
@@ -73,6 +73,8 @@ enum protocol_version determine_protocol_version_server(void)
string_list_clear(&list, 0);
}
+ trace2_data_intmax("transfer", NULL, "negotiated-version", version);
+
return version;
}