Merge branch 'js/log-protocol-version'
Debugging aid. * js/log-protocol-version: connect, protocol: log negotiated protocol version
This commit is contained in:
commit
b81a85ecd8
@ -164,6 +164,8 @@ enum protocol_version discover_version(struct packet_reader *reader)
|
||||
BUG("unknown protocol version");
|
||||
}
|
||||
|
||||
trace2_data_intmax("transfer", NULL, "negotiated-version", version);
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user