]> source.dussan.org Git - jgit.git/commit
Remove validate support when reusing cached pack 52/46452/2
authorShawn Pearce <spearce@spearce.org>
Fri, 24 Apr 2015 18:16:33 +0000 (11:16 -0700)
committerShawn Pearce <spearce@spearce.org>
Fri, 24 Apr 2015 18:31:22 +0000 (11:31 -0700)
commit6e5c71b358e9b9b883f24f073e869ff6affe5bf4
tree71adb77cb2238334af3e41c4c9e87c3807b3b410
parenta3476ced1fcebeeb0d9837aac4c2e833732a236b
Remove validate support when reusing cached pack

Cached packs are only used when writing over the network or to
a bundle file and reuse validation is always disabled in these
two contexts. The client/consumer of the stream will be SHA-1
checksumming every object.

Reuse validation is most critical during local GC to avoid silently
ignoring corruption by stopping as soon as a problem is found and
leaving everything alone for the end-user to debug and salvage.
Cached packs are not supported during local GC as the bitmap rebuild
logic does not support including a cached pack in the result.

Strip out the validation and force PackWriter to always disable the
cached pack feature if reuseValidation is enabled.

Change-Id: If0d7baf2ae1bf1f7e71bf773151302c9f7887039
12 files changed:
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlock.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsCachedPack.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteArrayWindow.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteBufferWindow.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteWindow.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalCachedPack.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCursor.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/ObjectReuseAsIs.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java