Collection<String> (@NotNull String remoteBranch) { Collection<String> trackingBranches = null; for (GitRepository repository : myRepositories) { Collection<String> tb = getTrackingBranches(repository, remoteBranch); if (trackingBranches == null) { trackingBranches = tb; } else { trackingBranches = ContainerUtil.intersection(trackingBranches, tb); } } return trackingBranches == null ? Collections.emptyList() : trackingBranches; }