From d9f52ddccc358dbbc1695bf219aa063b5cba76a7 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Sun, 3 Dec 2017 14:48:17 +0300 Subject: [PATCH] git: spam less to the log It is OK not to find some files by path, because the method is used e.g. to get local changes from a `git diff ` output, which contains file absent in the current working tree. On the other hand, the log didn't prove itself as useful yet, so it's OK to silence it. If we find that we should warn about the absent file in certain cases, we can introduce a different method for that. --- plugins/git4idea/src/git4idea/GitUtil.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/git4idea/src/git4idea/GitUtil.java b/plugins/git4idea/src/git4idea/GitUtil.java index 08f705635ab7..ffdf3567199f 100644 --- a/plugins/git4idea/src/git4idea/GitUtil.java +++ b/plugins/git4idea/src/git4idea/GitUtil.java @@ -871,7 +871,7 @@ public class GitUtil { file = LocalFileSystem.getInstance().refreshAndFindFileByPath(absolutePath); } if (file == null) { - LOG.warn("VirtualFile not found for " + absolutePath); + LOG.debug("VirtualFile not found for " + absolutePath); } return file; } @@ -909,11 +909,8 @@ public class GitUtil { String message = "Change is not found for " + file.getPath(); if (changeListManager.isInUpdate()) { message += " because ChangeListManager is being updated."; - LOG.debug(message); - } - else { - LOG.info(message); } + LOG.debug(message); } } }