From 6a5019f5390482f076134cd672b80fd75868831e Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Thu, 4 Apr 2013 19:43:12 -0700 Subject: [PATCH] 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 --- .../internal/storage/pack/ObjectToPack.java | 18 ++++-------------- 1 file 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 c9f4274ee..73d80d846 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: *