boolean (@NotNull Map<GitRepository, GitPushRepoResult> rejected) { boolean pushingNotCurrentBranch = ContainerUtil.exists(rejected.entrySet(), entry -> { GitRepository repository = entry.getKey(); GitLocalBranch currentBranch = repository.getCurrentBranch(); String pushedBranch = entry.getValue().getSourceBranch(); return currentBranch == null || !StringUtil.equals(currentBranch.getFullName(), pushedBranch); }); LOG.debug("Pushing non current branch condition is [" + pushingNotCurrentBranch + "]"); return pushingNotCurrentBranch; }