aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Borowitz2012-03-23 17:38:06 (EDT)
committerDave Borowitz2012-03-23 17:38:06 (EDT)
commite0531ace35b9c8eca9ded0a7b1540de3c49dbde6 (patch)
treeb90682221940dbe7c8317af378925aba70898138
parent9dd6e6cd297ae9c0d912ecfa07a148a29e6f4eee (diff)
downloadjgit-e0531ace35b9c8eca9ded0a7b1540de3c49dbde6.zip
jgit-e0531ace35b9c8eca9ded0a7b1540de3c49dbde6.tar.gz
jgit-e0531ace35b9c8eca9ded0a7b1540de3c49dbde6.tar.bz2
Properly parse first line in ReceivePack with no '\0'refs/changes/11/5411/1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
index 81c44ae..126d74f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
@@ -115,8 +115,9 @@ public class ReceivePack {
if (nul >= 0) {
for (String c : line.substring(nul + 1).split(" "))
caps.add(c);
- }
- this.line = line.substring(0, nul);
+ this.line = line.substring(0, nul);
+ } else
+ this.line = line;
this.capabilities = Collections.unmodifiableSet(caps);
}