FS: debug logging only if system config file cannot be found
The command 'git config --system --show-origin --list -z' fails if the system config doesn't exist. Use debug logging instead of a warning for failures of that command. Typically the user cannot do anything about it anyway, and JGit will just work without system config. Bug: 577492 Change-Id: If628ab376182183aea57a385c169e144d371bbb2 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
This commit is contained in:
parent
a26618f861
commit
cce547d6d1
|
@ -1530,6 +1530,7 @@ protected File discoverGitSystemConfig() {
|
||||||
|
|
||||||
String w;
|
String w;
|
||||||
try {
|
try {
|
||||||
|
// This command prints the path even if it doesn't exist
|
||||||
w = readPipe(gitExe.getParentFile(),
|
w = readPipe(gitExe.getParentFile(),
|
||||||
new String[] { gitExe.getPath(), "config", "--system", //$NON-NLS-1$ //$NON-NLS-2$
|
new String[] { gitExe.getPath(), "config", "--system", //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
"--edit" }, //$NON-NLS-1$
|
"--edit" }, //$NON-NLS-1$
|
||||||
|
@ -1552,7 +1553,10 @@ protected File discoverGitSystemConfig() {
|
||||||
"--show-origin", "--list", "-z" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
"--show-origin", "--list", "-z" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
SystemReader.getInstance().getDefaultCharset().name());
|
SystemReader.getInstance().getDefaultCharset().name());
|
||||||
} catch (CommandFailedException e) {
|
} 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;
|
return null;
|
||||||
}
|
}
|
||||||
if (w == null) {
|
if (w == null) {
|
||||||
|
|
Loading…
Reference in New Issue