ls-remote: set packet_trace_identity(<name>)
Set packet_trace_identity() for ls-remote. This replaces the generic "git" identity in GIT_TRACE_PACKET=<file> traces to "ls-remote", e.g.: [...] packet: upload-pack> version 2 [...] packet: upload-pack> agent=git/2.32.0-dev [...] packet: ls-remote< version 2 [...] packet: ls-remote< agent=git/2.32.0-dev Where in an "git ls-remote file://<path>" dialog ">" is the sender (or "to the server") and "<" is the recipient (or "received by the client"). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
ebf3c04b26
commit
f58c7468cd
@ -27,9 +27,9 @@ test_expect_success 'list refs with git:// using protocol v2' '
|
||||
ls-remote --symref "$GIT_DAEMON_URL/parent" >actual &&
|
||||
|
||||
# Client requested to use protocol v2
|
||||
grep "git> .*\\\0\\\0version=2\\\0$" log &&
|
||||
grep "ls-remote> .*\\\0\\\0version=2\\\0$" log &&
|
||||
# Server responded using protocol v2
|
||||
grep "git< version 2" log &&
|
||||
grep "ls-remote< version 2" log &&
|
||||
|
||||
git ls-remote --symref "$GIT_DAEMON_URL/parent" >expect &&
|
||||
test_cmp expect actual
|
||||
@ -151,7 +151,7 @@ test_expect_success 'list refs with file:// using protocol v2' '
|
||||
ls-remote --symref "file://$(pwd)/file_parent" >actual &&
|
||||
|
||||
# Server responded using protocol v2
|
||||
grep "git< version 2" log &&
|
||||
grep "ls-remote< version 2" log &&
|
||||
|
||||
git ls-remote --symref "file://$(pwd)/file_parent" >expect &&
|
||||
test_cmp expect actual
|
||||
|
Reference in New Issue
Block a user