]> source.dussan.org Git - jgit.git/commit
UploadPack: Avoid parsing want list on clone 11/2411/3
authorShawn O. Pearce <spearce@spearce.org>
Thu, 3 Feb 2011 20:37:39 +0000 (12:37 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 4 Feb 2011 17:10:23 +0000 (09:10 -0800)
commit2096c749c30c2420362859383bbdd1e307790569
tree390cef109ded089b8d94ab12baeb4154c2dc5bf7
parenta3620cbbe144c9b666ce4472fd5e8ef1222bd641
UploadPack: Avoid parsing want list on clone

If a client wants to perform a clone of the repository, it sends
wants, but no haves.  There is no point in parsing the want list
within UploadPack, as there won't be a common merge base search.
Instead just defer the parsing to PackWriter, which will do its
own parsing and object enumeration.

If the client does have a "have" set, defer parsing of the want list
until the have list is also parsed, and parse them together in a
single batch queue.  This lets the underlying storage system use a
larger lookup batch if there is significant latency involved when
resolving an ObjectId to a RevObject.

Change-Id: I9c30d34f8e344da05c8a2c041a6dc181d8e8bc19
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java