From 109c695936d3b4029b16f2c9cff7ef993133f303 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Thu, 29 Jul 2010 16:59:40 -0700 Subject: [PATCH] Expose getType in ObjectToPack Storage implementations may find this useful when implementing the ObjectReuseAsIs interface on their ObjectReader. Expose it so we don't force them to create a redundant copy of the information. Change-Id: I802ec8113c00884fccde5d0e92b9849716316f62 Signed-off-by: Shawn O. Pearce --- .../src/org/eclipse/jgit/storage/pack/ObjectToPack.java | 3 ++- 1 file changed, 2 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 70188a380..3161668be 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 @@ -192,7 +192,8 @@ public class ObjectToPack extends PackedObjectInfo { return getOffset() != 0; } - int getType() { + /** @return the type of this object. */ + public int getType() { return (flags >> TYPE_SHIFT) & 0x7; }