Actually the JGit wiki is broken ... can't sign the ECA and post the fix :-(
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
index e7308b5..1aa71e5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
@@ -569,7 +569,6 @@ void selectObjectRepresentation(PackWriter packer, ObjectToPack otp,
private void handlePackError(IOException e, PackFile p) {
String warnTmpl = null;
- String errTmpl = JGitText.get().exceptionWhileReadingPack;
if ((e instanceof CorruptObjectException)
|| (e instanceof PackInvalidException)) {
warnTmpl = JGitText.get().corruptPack;
@@ -577,11 +576,11 @@ private void handlePackError(IOException e, PackFile p) {
removePack(p);
} else if (e instanceof FileNotFoundException) {
if (p.getPackFile().exists()) {
- errTmpl = JGitText.get().packInaccessible;
+ warnTmpl = JGitText.get().packInaccessible;
} else {
warnTmpl = JGitText.get().packWasDeleted;
- removePack(p);
}
+ removePack(p);
} else if (FileUtils.isStaleFileHandleInCausalChain(e)) {
warnTmpl = JGitText.get().packHandleIsStale;
removePack(p);
@@ -598,7 +597,8 @@ private void handlePackError(IOException e, PackFile p) {
// Don't remove the pack from the list, as the error may be
// transient.
LOG.error(MessageFormat.format(
- errTmpl, p.getPackFile().getAbsolutePath()), e);
+ JGitText.get().exceptionWhileReadingPack, p.getPackFile()
+ .getAbsolutePath()), e);
}
}