Method relies on PackIndex getObjectCount(). Exposed only to package. Signed-off-by: Marek Zawirski <marek.zawirski@xxxxxxxxx> --- .../src/org/spearce/jgit/lib/PackFile.java | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java b/org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java index b1fbc2a..84562aa 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java @@ -145,6 +145,16 @@ public class PackFile { pack.close(); } + /** + * Obtain the total number of objects available in this pack. This method + * relies on pack index, giving number of effectively available objects. + * + * @return number of objects in index of this pack, likewise in this pack + */ + long getObjectCount() { + return idx.getObjectCount(); + } + final UnpackedObjectCache.Entry readCache(final long position) { return UnpackedObjectCache.get(pack, position); } -- 1.5.5.1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html