Browse Source

Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: Id2fea30664d53b31ad026ee5ae06a5a24d731a52
stable-5.2
David Pursehouse 6 years ago
parent
commit
90876890bc
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java

2
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java

@ -360,6 +360,7 @@ public class ObjectDirectory extends FileObjectDatabase {
// The hasObject call should have only touched the index,
// so any failure here indicates the index is unreadable
// by this process, and the pack is likewise not readable.
LOG.warn("Unable to read packfile " + p.getPackFile(), e);
removePack(p);
}
}
@ -652,6 +653,7 @@ public class ObjectDirectory extends FileObjectDatabase {
if ((e instanceof CorruptObjectException)
|| (e instanceof PackInvalidException)) {
warnTmpl = JGitText.get().corruptPack;
LOG.warn("Packfile " + p.getPackFile() + " is corrupted", e);
// Assume the pack is corrupted, and remove it from the list.
removePack(p);
} else if (e instanceof FileNotFoundException) {

Loading…
Cancel
Save