use of git4idea.GitExecutionException in project intellij-community by JetBrains.
the class GitBranchWorker method loadCommitsToCompare.
@NotNull
private Couple<List<GitCommit>> loadCommitsToCompare(@NotNull GitRepository repository, @NotNull final String branchName) {
final List<GitCommit> headToBranch;
final List<GitCommit> branchToHead;
try {
headToBranch = GitHistoryUtils.history(myProject, repository.getRoot(), ".." + branchName);
branchToHead = GitHistoryUtils.history(myProject, repository.getRoot(), branchName + "..");
} catch (VcsException e) {
// we treat it as critical and report an error
throw new GitExecutionException("Couldn't get [git log .." + branchName + "] on repository [" + repository.getRoot() + "]", e);
}
return Couple.of(headToBranch, branchToHead);
}
Aggregations