summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2015-03-02 16:28:33 -0500
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2015-03-02 16:28:35 -0500
commita75bd35fa49fa66ab790f6de2b765452e0b58c17 (patch)
tree4379294ca94d248f342498ca24e82d1bfdf1c866 /org.eclipse.jgit
parent26fd56f167e6377777e6d46c14779183e4bcb55a (diff)
parentcc8c270c9b8e56760da842e6ec7a83fd15a672fb (diff)
downloadjgit-a75bd35fa49fa66ab790f6de2b765452e0b58c17.tar.gz
jgit-a75bd35fa49fa66ab790f6de2b765452e0b58c17.zip
Merge "Allow public access to PackIndex"
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);
}