Browse Source
Imitate the packet tracing feature from C Git v1.7.5-rc0~58^2~1 (add packet tracing debug code, 2011-02-24). Unlike C Git, use the log4j log level setting instead of the GIT_TRACE_PACKET environment variable to enable tracing. Tested as follows: 1. Enable tracing by adding the lines log4j.logger.org.eclipse.jgit.transport=DEBUG, stderr log4j.additivity.org.eclipse.jgit.transport=false to org.eclipse.jgit.pgm/resources/log4j.properties. 2. mvn package 3. org.eclipse.jgit.pgm/target/jgit \ ls-remote git://git.kernel.org/pub/scm/git/git 2>&1 |less Then the output provides a trace of packets sent and received over the wire: 2016-08-24 16:36:42 DEBUG PacketLineOut:145 - git> git-upload-pack /pub/scm/git/git^@host=git.kernel.org^@ 2016-08-24 16:36:42 DEBUG PacketLineIn:165 - git< 2632c897f74b1cc9b5533f467da459b9ec725538 HEAD^@multi_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed symref=HEAD:refs/heads/master agent=git/2.8.4 2016-08-24 16:36:42 DEBUG PacketLineIn:165 - git< e0c1ceafc5bece92d35773a75fff59497e1d9bd5 refs/heads/maint Change-Id: I5028c064f3ac090510386057cb4e6d30d4eae232 Signed-off-by: Dan Wang <dwwang@google.com>stable-4.5
Dan Wang
8 years ago
committed by
Jonathan Nieder
2 changed files with 31 additions and 5 deletions
Loading…
Reference in new issue