]> source.dussan.org Git - jgit.git/commit
PackWriter: Use TOPO order only for incremental packs 57/2357/1
authorShawn O. Pearce <spearce@spearce.org>
Tue, 25 Jan 2011 00:18:23 +0000 (16:18 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Thu, 27 Jan 2011 16:58:44 +0000 (08:58 -0800)
commitc218a0760ddcdd9a392b0ae15f99fdccf823cd42
treec122b2f792c91b07e0d4c3b4b1dfbd4d961a1ff3
parent559c4661c358a6210c411badf54d4c6a6648b213
PackWriter: Use TOPO order only for incremental packs

When performing an initial clone of a repository there are no
uninteresting commits, and the resulting pack will be completely
self-contained.  Therefore PackWriter does not need to honor C
Git standard TOPO ordering as described in JGit commit ba984ba2e0a
("Fix checkReferencedIsReachable to use correct base list").

Switching to COMMIT_TIME_DESC when there are no uninteresting commits
allows the "Counting objects" phase to emit progress earlier, as the
RevWalk will not buffer the commit list.  When TOPO is set the RevWalk
enumerates all commits first, before outputing any for PackWriter to
mark progress updates from.

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