Disambiguate pkt-line "0000" from "0004"
commit7623723498f108c616e850b5eaa5d7eb6adc23d6
authorShawn O. Pearce <spearce@spearce.org>
Thu, 4 Jun 2009 21:43:58 +0000 (4 14:43 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Mon, 15 Jun 2009 19:06:31 +0000 (15 21:06 +0200)
tree384a310d98b1c35df3f5be6244fe37f1b69793cc
parente9198d92e54ce0749002d6b170a2913ac2e50622
Disambiguate pkt-line "0000" from "0004"

The pkt-line length includes its own 4 bytes.  So "0000" is the
magic flush/end marker used as part of the protocols based upon
pkt-line, while "0004" indicates a packet of 0 bytes, but not a
flush/end marker.

Currently there is no need for this distinction in the code, as
the protocol never sends an empty packet, but it reduces the risk
that in the future a "0004" packet is misread as a "0000" flush.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/transport/BasePackConnection.java
org.spearce.jgit/src/org/spearce/jgit/transport/BasePackPushConnection.java
org.spearce.jgit/src/org/spearce/jgit/transport/DaemonClient.java
org.spearce.jgit/src/org/spearce/jgit/transport/PacketLineIn.java
org.spearce.jgit/src/org/spearce/jgit/transport/ReceivePack.java
org.spearce.jgit/src/org/spearce/jgit/transport/UploadPack.java