]> source.dussan.org Git - jgit.git/commitdiff
Improve error message when receive.maxCommandBytes is exceeded 98/165498/3
authorDavid Pursehouse <david.pursehouse@gmail.com>
Fri, 26 Jun 2020 05:23:29 +0000 (14:23 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Sun, 28 Jun 2020 23:57:42 +0000 (08:57 +0900)
The message "Too many commands" implies there is a hard limit on the
number of commands, which isn't the case. The limit is on the total
size of the received data, as explained in change I84317d396 which
introduced the configuration setting receive.maxCommandBytes:

  shorter reference names allow for more commands, longer reference
  names permit fewer commands per batch.

Change the message to:

  Commands size exceeds limit defined in receive.maxCommandBytes

Change-Id: I678b78f919b2fec8f8058f3403f2541c26a5d00e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushConnectionTest.java
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties

index 0179d8c26f91228c41f2e7b454d4729bfde4f6ad..21fde3e76e7b500db9fae021af671fc92cdab028 100644 (file)
@@ -162,7 +162,9 @@ public class PushConnectionTest {
                                fail("server did not abort");
                        } catch (TransportException e) {
                                String msg = e.getMessage();
-                               assertEquals("remote: Too many commands", msg);
+                               assertEquals(
+                                               "remote: Commands size exceeds limit defined in receive.maxCommandBytes",
+                                               msg);
                        }
                }
        }
index e6da551bb7854d0dc492f0e2256b18889e8f75a1..8cbcb0f67a43fe12c012f8ca23b2e0cc579f0b03 100644 (file)
@@ -661,7 +661,7 @@ threadInterruptedWhileRunning="Current thread interrupted while running {0}"
 timeIsUncertain=Time is uncertain
 timerAlreadyTerminated=Timer already terminated
 timeoutMeasureFsTimestampResolution=measuring filesystem timestamp resolution for ''{0}'' timed out, fall back to resolution of 2 seconds
-tooManyCommands=Too many commands
+tooManyCommands=Commands size exceeds limit defined in receive.maxCommandBytes
 tooManyFilters=Too many "filter" lines in request
 tooManyIncludeRecursions=Too many recursions; circular includes in config file(s)?
 topologicalSortRequired=Topological sort required.