From e0531ace35b9c8eca9ded0a7b1540de3c49dbde6 Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Fri, 23 Mar 2012 14:38:06 -0700 Subject: [PATCH] Properly parse first line in ReceivePack with no '\0' Change-Id: Ic98e17aff4e4b3c3fa0359082bab689e4522e3d7 --- .../src/org/eclipse/jgit/transport/ReceivePack.java | 5 +++-- 1 file 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 81c44ae322..126d74fc37 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); } -- 2.39.5