diff options
author | Luca Milanesio <luca.milanesio@gmail.com> | 2019-02-11 07:49:43 +0000 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-03-06 02:36:37 +0100 |
commit | baf1bb20d02f60d001a4d77d9749f845d4ada45e (patch) | |
tree | f70f5b67625dc18c48c16f7c2f43759719a6a941 | |
parent | 8f1fd09bea22139bb1241b5290530d839702049d (diff) | |
download | jgit-baf1bb20d02f60d001a4d77d9749f845d4ada45e.tar.gz jgit-baf1bb20d02f60d001a4d77d9749f845d4ada45e.zip |
ObjectDirectory: extra logging on packfile exceptions
Display extra logging, including the exception with the associated
stacktrace, whenever a packFile can't be read and thus removed
from the packlist.
Change-Id: I97a4e31dc427bfcc0baae438dcbe2dcd4704b824
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
(cherry picked from commit 962babc4b27ffd90058fe7734f17ed1c4e77d958)
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java | 2 |
1 files changed, 2 insertions, 0 deletions
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 153c7dd925..6b8ef3a1bb 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 @@ -355,6 +355,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); } } @@ -647,6 +648,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) { |