boolean (@NotNull Map<GitRepository, GitRemoteBranch> trackedBranches, @NotNull String localBranch) { for (GitRepository repository : trackedBranches.keySet()) { if (exists(repository.getBranchTrackInfos(), info -> !info.getLocalBranch().getName().equals(localBranch) && info.getRemoteBranch().equals(trackedBranches.get(repository)))) { return false; } } return true; }