diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2021-11-28 12:04:55 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2021-11-28 12:04:55 +0100 |
commit | 7ca091a52683a8d61f2b1f3cec13d0985d874ef9 (patch) | |
tree | b3c9ec1821fbf8f8b71aaffee56a0b3daa744b0f /org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java | |
parent | 9e4fe739c7c100980a0a8500a945b0c0cb8c7571 (diff) | |
parent | b868f9101306e6128fff85c52a0ea6acd4488f07 (diff) | |
download | jgit-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.java | 6 |
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) { |