boolean (@NotNull GitRepository repository, @Nullable String baseBranch, @NotNull String rebasingBranch) { try { String range = GitRebaseUtils.getCommitsRangeToRebase(baseBranch, rebasingBranch); List<? extends TimedVcsCommit> commits = GitHistoryUtils.collectTimedCommits(myProject, repository.getRoot(), range); return exists(commits, commit -> GitProtectedBranchesKt.isCommitPublished(repository, commit.getId())); } catch (VcsException e) { LOG.error("Couldn't collect commits", e); return true; } }