]> source.dussan.org Git - jgit.git/commit
Add a minimum negotiation feature for fetch 29/117129/4
authorTerry Parker <tparker@google.com>
Sun, 11 Feb 2018 22:37:22 +0000 (14:37 -0800)
committerTerry Parker <tparker@google.com>
Mon, 12 Feb 2018 22:03:11 +0000 (14:03 -0800)
commit9530c10192cf033c021802a3b295b06864654464
treeb324e8a8f5d860a28942f4584a3b2c8012417952
parent302596cc675d00e41f0ff07efef58063afe20c79
Add a minimum negotiation feature for fetch

Android an Chrome have several repos with >300k refs. We sometimes see
negotiations of >100k rounds. This change provides a "minimal negotiation"
feature on the client side that limits how many "have" lines the client
sends. The client extracts the current SHA-1 values for the refs in its
wants set, and terminates negotiation early when all of those values have
been sent as haves. If a new branch is being fetched then that set will
be empty and the client will terminate after current default minimum
of two rounds.

This feature is gated behind a "fetch.useminimalnegotiation" configuration
flag, which defaults to false.

Change-Id: Ib12b095cac76a59da6e8f72773c4129e3b32ff2b
Signed-off-by: Terry Parker <tparker@google.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TestProtocol.java