aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2025-01-29 22:16:51 +0000
committerGerrit Code Review <support@gerrithub.io>2025-01-29 22:16:51 +0000
commit9d0e4cd014a0cf1be83040974e94352a195b9f0e (patch)
treeb65c33f41447ef252f14becb00c615a990925037
parent12b89ab6dbc897123089492741270a762911a8f3 (diff)
parent772ee0e5fb9fbfb4a82ceb872e187abf62a4b453 (diff)
downloadjgit-9d0e4cd014a0cf1be83040974e94352a195b9f0e.tar.gz
jgit-9d0e4cd014a0cf1be83040974e94352a195b9f0e.zip
Merge "Log pruned packfiles as debug and not warn logs"
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackDirectory.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackDirectory.java
index e31126f027..706dbd6281 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackDirectory.java
@@ -314,6 +314,7 @@ class PackDirectory {
private void handlePackError(IOException e, Pack p) {
String warnTmpl = null;
+ String debugTmpl = null;
int transientErrorCount = 0;
String errTmpl = JGitText.get().exceptionWhileReadingPack;
if ((e instanceof CorruptObjectException)
@@ -328,7 +329,7 @@ class PackDirectory {
errTmpl = JGitText.get().packInaccessible;
transientErrorCount = p.incrementTransientErrorCount();
} else {
- warnTmpl = JGitText.get().packWasDeleted;
+ debugTmpl = JGitText.get().packWasDeleted;
remove(p);
}
} else if (FileUtils.isStaleFileHandleInCausalChain(e)) {
@@ -340,6 +341,9 @@ class PackDirectory {
if (warnTmpl != null) {
LOG.warn(MessageFormat.format(warnTmpl,
p.getPackFile().getAbsolutePath()), e);
+ } else if (debugTmpl != null) {
+ LOG.debug(MessageFormat.format(debugTmpl,
+ p.getPackFile().getAbsolutePath()), e);
} else {
if (doLogExponentialBackoff(transientErrorCount)) {
// Don't remove the pack from the list, as the error may be