jgit/org.eclipse.jgit.test/tst/org/eclipse/jgit
Shawn Pearce 0bff481d45 Limit receive commands
Place a configurable upper bound on the amount of command data
received from clients during `git push`.  The limit is applied to the
encoded wire protocol format, not the JGit in-memory representation.
This allows clients to flexibly use the limit; shorter reference names
allow for more commands, longer reference names permit fewer commands
per batch.

Based on data gathered from many repositories at $DAY_JOB, the average
reference name is well under 200 bytes when encoded in UTF-8 (the wire
encoding).  The new 3 MiB default receive.maxCommandBytes allows about
11,155 references in a single `git push` invocation.  A Gerrit Code
Review system with six-digit change numbers could still encode 29,399
references in the 3 MiB maxCommandBytes limit.

Change-Id: I84317d396d25ab1b46820e43ae2b73943646032c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-02-11 00:20:36 +01:00
..
api FetchCommandTest: Don't declare specific exceptions in test methods 2017-02-09 15:10:15 +09:00
attributes Add Attribute Macro Expansion 2016-02-11 17:08:49 +01:00
diff Deprecate SafeBufferedOutputStream 2016-11-14 15:33:54 -08:00
dircache DirCacheBasicTest: Open ObjectInserter.Formatter in try-with-resource 2016-02-15 17:19:17 +09:00
events Move base test classes to the junit bundle for reuse for Java 7 tests 2013-02-04 07:24:56 +01:00
fnmatch FileNameMatcherTest: Use Character.valueOf rather than new Character 2016-10-19 15:09:37 +09:00
gitrepo RepoCommandTest: Don't wrap create{Bare,Work}Directory in t-w-r 2017-01-28 17:46:27 +01:00
ignore Ignore trailing spaces in directory rule patterns 2016-09-14 07:43:52 -04:00
indexdiff Fix symlink content comparison on MacOS in tree walk 2016-10-11 00:20:23 +02:00
internal/storage Prefer smaller GC files during DFS garbage collection 2017-02-08 14:37:12 -08:00
junit Clarify the semantics of DfsRefDatabase#compareAndPut 2016-08-25 19:12:39 -07:00
lib IndexDiffSubmoduleTest: Fix negative use count 2017-02-10 19:48:52 +09:00
merge Organize imports 2016-11-14 13:25:20 -08:00
nls Move console classes to pgm bundle 2015-02-10 09:14:48 +01:00
notes NoteMapTest: Add missing @Test annotations 2016-08-26 00:12:32 +02:00
patch Organize imports 2016-11-14 13:25:20 -08:00
revplot Revert "CommitBuilder should check for duplicate parents" 2015-03-18 16:26:05 -07:00
revwalk Fix merge-base calculation 2016-11-28 09:38:19 +01:00
storage/file Remove hardcoded target/trash from test cases 2013-11-01 19:57:47 -07:00
submodule SubmoduleAddTest: Open Git in try-with-resource 2016-02-05 14:11:54 +09:00
symlinks SymlinksTest: Open git and TreeWalk in try-with-resource 2016-02-05 14:05:22 +09:00
test/resources Fix loop in auto gc 2016-11-07 22:31:10 +01:00
transport Limit receive commands 2017-02-11 00:20:36 +01:00
treewalk Merge FileTreeIteratorJava7Test into FileTreeIteratorTest 2017-01-30 13:23:52 +01:00
util Detect stale-file-handle error in causal chain 2017-01-30 22:36:59 -04:00