From: David Turner Date: Fri, 14 Oct 2016 20:44:51 +0000 (-0400) Subject: Config: do not add spaces before units X-Git-Tag: v4.6.0.201612231935-r~79^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fchanges%2F83%2F83483%2F1;p=jgit.git Config: do not add spaces before units Adding a space before the unit ('g', 'm', 'k) causes git to fail with the error: fatal: bad numeric config value Change-Id: I57f11d3a1cdcca4549858e773af1a2a80fc0369f Signed-off-by: David Turner Signed-off-by: David Pursehouse --- diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java index a041bb70c4..8fe8a96e99 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java @@ -835,11 +835,11 @@ public class Config { final String s; if (value >= GiB && (value % GiB) == 0) - s = String.valueOf(value / GiB) + " g"; //$NON-NLS-1$ + s = String.valueOf(value / GiB) + "g"; //$NON-NLS-1$ else if (value >= MiB && (value % MiB) == 0) - s = String.valueOf(value / MiB) + " m"; //$NON-NLS-1$ + s = String.valueOf(value / MiB) + "m"; //$NON-NLS-1$ else if (value >= KiB && (value % KiB) == 0) - s = String.valueOf(value / KiB) + " k"; //$NON-NLS-1$ + s = String.valueOf(value / KiB) + "k"; //$NON-NLS-1$ else s = String.valueOf(value);