From: Shawn O. Pearce Date: Thu, 29 Jul 2010 23:59:40 +0000 (-0700) Subject: Expose getType in ObjectToPack X-Git-Tag: v0.9.1~101 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F1216%2F3;p=jgit.git 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 --- 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 70188a3803..3161668be5 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; }