]> source.dussan.org Git - jgit.git/commitdiff
Use right variable in error message about depth 93/128393/5
authorIvan Frade <ifrade@google.com>
Thu, 30 Aug 2018 19:44:51 +0000 (12:44 -0700)
committerIvan Frade <ifrade@google.com>
Thu, 30 Aug 2018 21:37:06 +0000 (14:37 -0700)
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>
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java

index a880570891cea74d1aadd191edcda5fe1bff7736..03fc57cba25bebd9fd6f2c7eb3d578d4a1004da8 100644 (file)
@@ -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(