summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2013-04-04 19:43:12 -0700
committerShawn Pearce <spearce@spearce.org>2013-04-04 19:44:41 -0700
commit6a5019f5390482f076134cd672b80fd75868831e (patch)
tree004eeba1ffa2b86e9610fefab871a46c3ae703e4 /org.eclipse.jgit
parent241eed844da1c00862b81701c07a08534b5a382e (diff)
downloadjgit-6a5019f5390482f076134cd672b80fd75868831e.tar.gz
jgit-6a5019f5390482f076134cd672b80fd75868831e.zip
Renumber internal ObjectToPack flags
Now that WANT_WRITE is gone renumber the flags to move the unused bit next to the type. Recluster AS_IS and DELTA_ATTEMPTED to be next to each other since these bits are tested as a pair. Change-Id: I42994b5ff1f67435e15c3f06d02e3b82141e8f08
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/ObjectToPack.java18
1 files changed, 4 insertions, 14 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/ObjectToPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/ObjectToPack.java
index c9f4274eea..73d80d8462 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/ObjectToPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/ObjectToPack.java
@@ -57,26 +57,16 @@ import org.eclipse.jgit.transport.PackedObjectInfo;
* each object as they are written to the output stream.
*/
public class ObjectToPack extends PackedObjectInfo {
- private static final int REUSE_AS_IS = 1 << 1;
-
+ private static final int REUSE_AS_IS = 1 << 0;
+ private static final int DELTA_ATTEMPTED = 1 << 1;
private static final int DO_NOT_DELTA = 1 << 2;
-
private static final int EDGE = 1 << 3;
-
- private static final int DELTA_ATTEMPTED = 1 << 4;
-
private static final int ATTEMPT_DELTA_MASK = REUSE_AS_IS | DELTA_ATTEMPTED;
-
private static final int TYPE_SHIFT = 5;
-
private static final int EXT_SHIFT = 8;
-
private static final int EXT_MASK = 0xf;
-
private static final int DELTA_SHIFT = 12;
-
private static final int NON_EXT_MASK = ~(EXT_MASK << EXT_SHIFT);
-
private static final int NON_DELTA_MASK = 0xfff;
/** Other object being packed that this will delta against. */
@@ -85,11 +75,11 @@ public class ObjectToPack extends PackedObjectInfo {
/**
* Bit field, from bit 0 to bit 31:
* <ul>
- * <li>1 bit: unused</li>
* <li>1 bit: canReuseAsIs</li>
+ * <li>1 bit: deltaAttempted</li>
* <li>1 bit: doNotDelta</li>
* <li>1 bit: edgeObject</li>
- * <li>1 bit: deltaAttempted</li>
+ * <li>1 bit: unused</li>
* <li>3 bits: type</li>
* <li>4 bits: subclass flags (if any)</li>
* <li>--</li>