diff options
author | Josh Steadmon <steadmon@google.com> | 2021-08-10 10:20:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-10 11:46:33 -0700 |
commit | 626beebdf85a6ea5561dd8a0c912c9e9fb5622b4 (patch) | |
tree | f089829c7587db5dba975b9c17323e9a488f5902 /t/t5705-session-id-in-capabilities.sh | |
parent | Git 2.33-rc0 (diff) | |
download | tgif-626beebdf85a6ea5561dd8a0c912c9e9fb5622b4.tar.xz |
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 't/t5705-session-id-in-capabilities.sh')
-rwxr-xr-x | t/t5705-session-id-in-capabilities.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t5705-session-id-in-capabilities.sh b/t/t5705-session-id-in-capabilities.sh index f1d189d5bc..eb8c79aafd 100755 --- a/t/t5705-session-id-in-capabilities.sh +++ b/t/t5705-session-id-in-capabilities.sh @@ -73,6 +73,17 @@ do grep \"key\":\"server-sid\" tr2-client-events && grep \"key\":\"client-sid\" tr2-server-events ' + + test_expect_success "client & server log negotiated version (v${PROTO})" ' + test_when_finished "rm -rf local tr2-client-events tr2-server-events" && + cp -r "$LOCAL_PRISTINE" local && + GIT_TRACE2_EVENT="$(pwd)/tr2-client-events" \ + git -c protocol.version=$PROTO -C local fetch \ + --upload-pack "GIT_TRACE2_EVENT=\"$(pwd)/tr2-server-events\" git-upload-pack" \ + origin && + grep \"key\":\"negotiated-version\",\"value\":\"$PROTO\" tr2-client-events && + grep \"key\":\"negotiated-version\",\"value\":\"$PROTO\" tr2-server-events + ' done test_done |