diff options
author | Shawn Pearce <spearce@spearce.org> | 2013-04-10 09:30:23 -0700 |
---|---|---|
committer | Shawn Pearce <spearce@spearce.org> | 2013-04-10 12:58:50 -0700 |
commit | eb17495ca4ce95c63bacf81af16ab19ff042b65c (patch) | |
tree | ecc715278fb368febf182dedd584b954e68428fe /org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java | |
parent | d0a533762586ce331a8f967042fa209c847c3c8d (diff) | |
download | jgit-eb17495ca4ce95c63bacf81af16ab19ff042b65c.tar.gz jgit-eb17495ca4ce95c63bacf81af16ab19ff042b65c.zip |
Disable CRC32 computation when no PackIndex will be created
If a server is streaming 3GiB worth of pack data to a client there
is no reason to compute the CRC32 checksum on the objects. The
CRC32 code computed by PackWriter is used only in the new index
created by writeIndex(), which is never invoked for the native Git
network protocols.
Object reuse may still compute its own CRC32 to verify the data
being copied from an existing pack has not been corrupted. This
check is done by the ObjectReader that implements ObjectReuseAsIs
and has no relationship to the CRC32 being skipped during output.
Change-Id: I05626f2e0d6ce19119b57d8a27193922636d60a7
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java index 54c8bf9045..4f5cda7abd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java @@ -200,6 +200,7 @@ public class BundleWriter { inc.addAll(include.values()); for (final RevCommit r : assume) exc.add(r.getId()); + packWriter.setIndexDisabled(true); packWriter.setDeltaBaseAsOffset(true); packWriter.setThin(exc.size() > 0); packWriter.setReuseValidatingObjects(false); |