aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2021-11-28 12:04:55 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2021-11-28 12:04:55 +0100
commit7ca091a52683a8d61f2b1f3cec13d0985d874ef9 (patch)
treeb3c9ec1821fbf8f8b71aaffee56a0b3daa744b0f /org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
parent9e4fe739c7c100980a0a8500a945b0c0cb8c7571 (diff)
parentb868f9101306e6128fff85c52a0ea6acd4488f07 (diff)
downloadjgit-7ca091a52683a8d61f2b1f3cec13d0985d874ef9.tar.gz
jgit-7ca091a52683a8d61f2b1f3cec13d0985d874ef9.zip
Merge branch 'stable-5.12' into stable-5.13
* stable-5.12: FS: debug logging only if system config file cannot be found Change-Id: I4f6fd422e15361118134c4d1534507e0bd81a172
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
index 300cf466cd..662aa750e6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
@@ -1531,6 +1531,7 @@ public abstract class FS {
String w;
try {
+ // This command prints the path even if it doesn't exist
w = readPipe(gitExe.getParentFile(),
new String[] { gitExe.getPath(), "config", "--system", //$NON-NLS-1$ //$NON-NLS-2$
"--edit" }, //$NON-NLS-1$
@@ -1553,7 +1554,10 @@ public abstract class FS {
"--show-origin", "--list", "-z" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
Charset.defaultCharset().name());
} catch (CommandFailedException e) {
- LOG.warn(e.getMessage());
+ // This command fails if the system config doesn't exist
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(e.getMessage());
+ }
return null;
}
if (w == null) {