Skip to content

Commit

Permalink
SLVSCODE-214 remove redundant logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-knize-sonarsource authored and jblievremont committed Jan 19, 2022
1 parent 6d32306 commit ba83a58
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/sonarsource/sonarlint/ls/git/GitUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.Collections;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
Expand Down Expand Up @@ -64,6 +65,8 @@ public static List<String> getCommitNamesForRef(String branchName, Git git) {
for (RevCommit commit : commits) {
commitNames.add(commit.getName());
}
} catch (IncorrectObjectTypeException e) {
// do nothing, jgit will throw it if branchName can not be resolved to any commit
} catch (GitAPIException | IOException e) {
LOG.error("Couldn't fetch commits for branch " + branchName, e);
}
Expand Down

0 comments on commit ba83a58

Please sign in to comment.