try {
headToBranch = GitHistoryUtils.history(project, repository.getRoot(), ".." + branchName);
branchToHead = GitHistoryUtils.history(project, 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 Pair.create(headToBranch, branchToHead);
}