From 823e9a972100ad197fcb40efb37e1ca33f4bdb01 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Thu, 8 Jul 2010 17:19:20 -0700 Subject: [PATCH] Add doNotDelta flag to ObjectToPack This flag will later control whether or not PackWriter search for a delta base for this object. Edge objects will never get searched, as the writer won't be outputting them, so they should always have this flag set on. Sometime in the future this flag should also be set for file blobs on file paths that have the "-delta" gitattribute set in the repository's attributes file. Change-Id: I6e518e1a6996c8ce00b523727f1b605e400e82c6 Signed-off-by: Shawn O. Pearce --- .../eclipse/jgit/storage/pack/ObjectToPack.java | 16 +++++++++++++++- .../eclipse/jgit/storage/pack/PackWriter.java | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/ObjectToPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/ObjectToPack.java index cad3aaeec..4016e92c9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/ObjectToPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/ObjectToPack.java @@ -61,6 +61,8 @@ public class ObjectToPack extends PackedObjectInfo { private static final int REUSE_AS_IS = 1 << 1; + private static final int DO_NOT_DELTA = 1 << 2; + private static final int TYPE_SHIFT = 5; private static final int DELTA_SHIFT = 8; @@ -75,7 +77,8 @@ public class ObjectToPack extends PackedObjectInfo { *