Browse Source

Improve error message when receive.maxCommandBytes is exceeded

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>
master
David Pursehouse 5 years ago
parent
commit
8774f54190
  1. 4
      org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushConnectionTest.java
  2. 2
      org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties

4
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushConnectionTest.java

@ -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);
}
}
}

2
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties

@ -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.

Loading…
Cancel
Save