diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2021-11-28 12:02:03 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2021-11-28 12:02:03 +0100 |
commit | 684ec2c316efed11023921860b9e039f0023f1b8 (patch) | |
tree | 7ada008a87da5364b4d5e2be738a1afbb39ceba1 /org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java | |
parent | e29325f06462847fe7099c9a41f78f15e8250b12 (diff) | |
parent | 122237439daee43956fe9f4255365afd40823e21 (diff) | |
download | jgit-684ec2c316efed11023921860b9e039f0023f1b8.tar.gz jgit-684ec2c316efed11023921860b9e039f0023f1b8.zip |
Merge branch 'stable-5.9' into stable-5.10
* stable-5.9:
FS: debug logging only if system config file cannot be found
Change-Id: Ib9eb4f4cc44ecc1958c9b6455ab7865913f8b247
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 0648dcf1e3..b815e367d8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java @@ -1524,6 +1524,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$ @@ -1546,7 +1547,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) { |