boolean (@NotNull Map<GitRepository, UnmergedBranchInfo> unmergedBranches) { Map<GitRepository, List<GitCommit>> history = new HashMap<>(); // we don't confuse user with the absence of repositories which branch was deleted w/o force, // we display no commits for them for (GitRepository repository : getRepositories()) { if (unmergedBranches.containsKey(repository)) { UnmergedBranchInfo unmergedInfo = unmergedBranches.get(repository); history.put(repository, getUnmergedCommits(repository, unmergedInfo.myTipOfDeletedUnmergedBranch, unmergedInfo.myBaseBranch)); } else { history.put(repository, Collections.emptyList()); } } Map<GitRepository, String> baseBranches = Maps.asMap(unmergedBranches.keySet(), it -> unmergedBranches.get(it).myBaseBranch); return myUiHandler.showBranchIsNotFullyMergedDialog(myProject, history, baseBranches, myBranchName); }