summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsPackFile.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsPackFile.java
index daad02a14b..13f3c36981 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsPackFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsPackFile.java
@@ -171,6 +171,12 @@ public final class DfsPackFile {
return packDesc;
}
+ /** @return whether the pack index file is loaded and cached in memory. */
+ public boolean isIndexLoaded() {
+ DfsBlockCache.Ref<PackIndex> idxref = index;
+ return idxref != null && idxref.get() != null;
+ }
+
/** @return bytes cached in memory for this pack, excluding the index. */
public long getCachedSize() {
return key.cachedSize.get();