From fc66d8eea0c43245fcab181ae2566f3d009542bb Mon Sep 17 00:00:00 2001 From: Tobias Hahnen Date: Fri, 24 Jan 2025 13:49:19 +0100 Subject: [PATCH] SLCORE-1140: Don't log an error when not in Git repository Currently when users are not in a Git repository there is an error logged for every action trying to invoke Git. This is too noisy and misleading as this is not an actual error. --- .../org/sonarsource/sonarlint/core/client/utils/GitUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/java-client-utils/src/main/java/org/sonarsource/sonarlint/core/client/utils/GitUtils.java b/client/java-client-utils/src/main/java/org/sonarsource/sonarlint/core/client/utils/GitUtils.java index 10b27a2be2..1fb3fa4513 100644 --- a/client/java-client-utils/src/main/java/org/sonarsource/sonarlint/core/client/utils/GitUtils.java +++ b/client/java-client-utils/src/main/java/org/sonarsource/sonarlint/core/client/utils/GitUtils.java @@ -50,7 +50,7 @@ public static Repository getRepositoryForDir(Path projectDir, ClientLogOutput cl .findGitDir(projectDir.toFile()) .setMustExist(true); if (builder.getGitDir() == null) { - clientLogOutput.log("Not inside a Git work tree: " + projectDir, ClientLogOutput.Level.ERROR); + clientLogOutput.log("Not inside a Git work tree: " + projectDir, ClientLogOutput.Level.DEBUG); return null; } return builder.build();