From 74d41be0d14c4b0234b76e3147beaeedab6537c1 Mon Sep 17 00:00:00 2001 From: Ivan Frade Date: Thu, 30 Aug 2018 12:44:51 -0700 Subject: [PATCH] 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 --- org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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( -- 2.39.5