use of git4idea.branch.GitRebaseParams in project intellij-community by JetBrains.
the class GitRebaseProcess method notifySuccess.
private void notifySuccess(@NotNull Map<GitRepository, GitSuccessfulRebase> successful, final MultiMap<GitRepository, GitRebaseUtils.CommitInfo> skippedCommits) {
String rebasedBranch = getCommonCurrentBranchNameIfAllTheSame(myRebaseSpec.getAllRepositories());
List<SuccessType> successTypes = map(successful.values(), GitSuccessfulRebase::getSuccessType);
SuccessType commonType = getItemIfAllTheSame(successTypes, SuccessType.REBASED);
GitRebaseParams params = myRebaseSpec.getParams();
String baseBranch = params == null ? null : notNull(params.getNewBase(), params.getUpstream());
if ("HEAD".equals(baseBranch)) {
baseBranch = getItemIfAllTheSame(myRebaseSpec.getInitialBranchNames().values(), baseBranch);
}
String message = commonType.formatMessage(rebasedBranch, baseBranch, params != null && params.getBranch() != null);
message += mentionSkippedCommits(skippedCommits);
myNotifier.notifyMinorInfo("Rebase Successful", message, new NotificationListener.Adapter() {
@Override
protected void hyperlinkActivated(@NotNull Notification notification, @NotNull HyperlinkEvent e) {
handlePossibleCommitLinks(e.getDescription(), skippedCommits);
}
});
}
Aggregations