From: Ivan Frade Date: Thu, 30 Aug 2018 19:44:51 +0000 (-0700) Subject: Use right variable in error message about depth X-Git-Tag: v5.1.0.201809051400-rc1~1^2~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fchanges%2F93%2F128393%2F5;p=jgit.git Use right variable in error message about depth When this exception is thrown, the `depth` member variable isn't set yet, resulting in a confusing error message: "Invalid depth: 0". Change-Id: I8a2bd5e1d9bec00acb0b8857bbf6821e95bf1369 Signed-off-by: Ivan Frade --- diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java index a880570891..03fc57cba2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java @@ -1015,7 +1015,7 @@ public class UploadPack { if (parsedDepth <= 0) { throw new PackProtocolException( MessageFormat.format(JGitText.get().invalidDepth, - Integer.valueOf(depth))); + Integer.valueOf(parsedDepth))); } if (reqBuilder.getShallowSince() != 0) { throw new PackProtocolException(