Merge branch 'stable-5.2' into stable-5.3

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

Change-Id: I4bbeb1d28ab042e3c6c74f7284f5d882ed034305
This commit is contained in:
David Pursehouse 2019-02-18 11:21:38 +09:00
commit 9d02e52406
1 changed files with 2 additions and 0 deletions

View File

@ -359,6 +359,7 @@ boolean hasPackedObject(AnyObjectId objectId) {
// 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);
}
}
@ -651,6 +652,7 @@ private void handlePackError(IOException e, PackFile p) {
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) {