]> source.dussan.org Git - jgit.git/commit
Fix cloning of repositories with big objects 02/1602/2
authorShawn O. Pearce <spearce@spearce.org>
Wed, 15 Sep 2010 15:38:02 +0000 (08:38 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 15 Sep 2010 15:42:14 +0000 (08:42 -0700)
commit5fce8d81d89a3b9790e93590b919f5af114e8628
treea3da9b019260d14e9fae038cc2d553d6e19bee6f
parent445a3a281d3fa9f8a264b32a463e84cfe5918a33
Fix cloning of repositories with big objects

When running IndexPack we use a CachedObjectDirectory, which
knows what objects are loose and tries to avoid stat(2) calls for
objects that do not exist in the repository, as stat(2) on Win32
is very slow.

However large delta objects found in a pack file are expanded into
a loose object, in order to avoid costly delta chain processing
when that object is used as a base for another delta.

If this expand occurs while working with the CachedObjectDirectory,
we need to update the cached directory data to include this new
object, otherwise it won't be available when we try to open it
during the object verify phase.

Bug: 324868
Change-Id: Idf0c76d4849d69aa415ead32e46a435622395d68
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/CachedObjectDirectory.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileObjectDatabase.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectory.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectoryInserter.java