Browse Source

Properly parse first line in ReceivePack with no '\0'

Change-Id: Ic98e17aff4e4b3c3fa0359082bab689e4522e3d7
stable-2.0
Dave Borowitz 13 years ago
parent
commit
e0531ace35
  1. 5
      org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java

5
org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java

@ -115,8 +115,9 @@ public class ReceivePack {
if (nul >= 0) { if (nul >= 0) {
for (String c : line.substring(nul + 1).split(" ")) for (String c : line.substring(nul + 1).split(" "))
caps.add(c); caps.add(c);
} this.line = line.substring(0, nul);
this.line = line.substring(0, nul); } else
this.line = line;
this.capabilities = Collections.unmodifiableSet(caps); this.capabilities = Collections.unmodifiableSet(caps);
} }

Loading…
Cancel
Save