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 <other branch>` 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.
This commit is contained in:
Kirill Likhodedov
2017-12-03 15:00:31 +03:00
parent 7eef6bd581
commit d9f52ddccc
+2 -5
View File
@@ -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);
}
}
}