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 96f1d542c..4eabb0316 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 @@ -1189,7 +1189,7 @@ public final class DfsPackFile { } } - private boolean isCorrupt(long offset) { + boolean isCorrupt(long offset) { LongList list = corruptObjects; if (list == null) return false; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java index 1665c2c77..66421e2a8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java @@ -476,7 +476,7 @@ public final class DfsReader extends ObjectReader implements ObjectReuseAsIs { PackIndex idx = pack.getPackIndex(this); for (ObjectToPack otp : objects) { long p = idx.findOffset(otp); - if (0 < p) { + if (0 < p && !pack.isCorrupt(p)) { otp.setOffset(p); tmp.add((DfsObjectToPack) otp); }