]> source.dussan.org Git - jgit.git/commit
PackWriter: Short-circuit counting on full cached pack reuse 39/2539/1
authorShawn O. Pearce <spearce@spearce.org>
Sat, 19 Feb 2011 01:06:36 +0000 (17:06 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 19 Feb 2011 01:36:45 +0000 (17:36 -0800)
commit3e64b928d51b3a28e89cfe2a3f0eeae35ef07839
tree133006fbbdb5b88c232d4eb38be987fedce6c5c2
parent388ba7e005fdc5b61a7a494fa44ba24489d0c6d0
PackWriter: Short-circuit counting on full cached pack reuse

If one or more cached packs fully covers the request, don't bother
with looking up the objects and trying to walk the graph.  Just use
the cached packs and return immediately.

This helps clones of quiet repositories that have not been modified
since their last repack, its likely the cached packs are accurate
and no graph walking is required.

Change-Id: I9062a5ac2f71b525322590209664a84051fd5f8a
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java