summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2017-02-08 15:34:00 -0800
committerShawn Pearce <spearce@spearce.org>2017-02-08 15:34:00 -0800
commit6450d956bca2374696f5ad8a566db76546ec6573 (patch)
tree5db87115603b64d2f0dd7e6f29bae4aad8b4d242 /org.eclipse.jgit
parentd67b18353754f9d8fe2d0a41e7812068bbbca1dd (diff)
downloadjgit-6450d956bca2374696f5ad8a566db76546ec6573.tar.gz
jgit-6450d956bca2374696f5ad8a566db76546ec6573.zip
Assume GC_REST and GC_TXN also attempted deltas during packing
In a DFS repository the DfsGarbageCollector will typically attempt delta compression while creating the three main pack files: GC, GC_REST and GC_TXN. Include all of these in the wasDeltaAttempted() decision so that future packers can bypass delta compression of non-delta objects. Change-Id: Ic2330c69fab0c494b920b4df0a290f3c2e1a03d7
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectRepresentation.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectRepresentation.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectRepresentation.java
index 7edae88110..ddcfff6082 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectRepresentation.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectRepresentation.java
@@ -43,8 +43,6 @@
package org.eclipse.jgit.internal.storage.dfs;
-import static org.eclipse.jgit.internal.storage.dfs.DfsObjDatabase.PackSource.GC;
-
import org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation;
import org.eclipse.jgit.lib.ObjectId;
@@ -76,6 +74,13 @@ class DfsObjectRepresentation extends StoredObjectRepresentation {
@Override
public boolean wasDeltaAttempted() {
- return pack.getPackDescription().getPackSource() == GC;
+ switch (pack.getPackDescription().getPackSource()) {
+ case GC:
+ case GC_REST:
+ case GC_TXN:
+ return true;
+ default:
+ return false;
+ }
}
}