@NotNull
private DiffInfo doLoadDiffInfo(@NotNull final BranchInfo from, @NotNull final BranchInfo to) throws VcsException {
String currentBranch = from.getFullName();
String targetBranch = to.getFullRemoteName();
List<GitCommit> commits1 = GitHistoryUtils.history(project, gitRepository.getRoot(), ".." + targetBranch);
List<GitCommit> commits2 = GitHistoryUtils.history(project, gitRepository.getRoot(), targetBranch + "..");
Collection<Change> diff = GitChangeUtils.getDiff(project, gitRepository.getRoot(), targetBranch, currentBranch, null);
GitCommitCompareInfo info = new GitCommitCompareInfo(GitCommitCompareInfo.InfoType.BRANCH_TO_HEAD);
info.put(gitRepository, diff);
info.put(gitRepository, Couple.of(commits1, commits2));
return new DiffInfo(info, currentBranch, targetBranch);
}