summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Frade <ifrade@google.com>2018-08-30 12:44:51 -0700
committerIvan Frade <ifrade@google.com>2018-08-30 14:37:06 -0700
commit74d41be0d14c4b0234b76e3147beaeedab6537c1 (patch)
treeeaedb9ab991325cfed356c472ce43fb3ed08adcc
parentaa095af791b4572d86bc36ad3305f699eb5c7355 (diff)
downloadjgit-74d41be0d14c4b0234b76e3147beaeedab6537c1.tar.gz
jgit-74d41be0d14c4b0234b76e3147beaeedab6537c1.zip
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 <ifrade@google.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java2
1 files changed, 1 insertions, 1 deletions
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(