aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorDavid Pletcher <dpletcher@google.com>2015-02-27 17:17:52 -0800
committerShawn Pearce <spearce@spearce.org>2015-03-02 15:52:27 -0500
commitcc8c270c9b8e56760da842e6ec7a83fd15a672fb (patch)
treeb7ee93213cc78c2daf574d1080b46ae1e456e42c /org.eclipse.jgit
parent12a55c34753669365d9e644e592d9d8c10e742f1 (diff)
downloadjgit-cc8c270c9b8e56760da842e6ec7a83fd15a672fb.tar.gz
jgit-cc8c270c9b8e56760da842e6ec7a83fd15a672fb.zip
Allow public access to PackIndex
The index provides access to a list of objects in a pack. This will be helpful for repository integrity checking. Change-Id: I435eeeb3fe1b1f5632d40528936416e97491d412 Signed-off-by: David Pletcher <dpletcher@google.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
index 5d130b6d61..45e9fc1558 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
@@ -214,7 +214,17 @@ public final class DfsPackFile implements AutoCloseable {
index = cache.put(key, POS_INDEX, sz, idx);
}
- PackIndex getPackIndex(DfsReader ctx) throws IOException {
+ /**
+ * Get the PackIndex for this PackFile.
+ *
+ * @param ctx
+ * reader context to support reading from the backing store if
+ * the index is not already loaded in memory.
+ * @return the PackIndex.
+ * @throws IOException
+ * the pack index is not available, or is corrupt.
+ */
+ public PackIndex getPackIndex(DfsReader ctx) throws IOException {
return idx(ctx);
}