private static void createWithDialog(@NotNull Project project,
                                       @Nullable String commitMessage,
                                       @NotNull List<? extends Change> changes,
                                       @NotNull PatchBuilder patchBuilder,
                                       @NotNull CommitContext commitContext) {
    CommitSession commitSession = CreatePatchCommitExecutor.createCommitSession(project, patchBuilder, commitContext);

    String title = VcsBundle.message("action.name.create.patch");
    if (!SessionDialog.configureCommitSession(project, title, commitSession, changes, commitMessage)) return;

    ProgressManager.getInstance().runProcessWithProgressSynchronously(() -> {
      commitSession.execute(changes, commitMessage);
    }, VcsBundle.message("create.patch.commit.action.progress"), true, project);
  }
private static void createWithDialog(@NotNull Project project,
                                       @Nullable String commitMessage,
                                       @NotNull List<? extends Change> changes,
                                       @NotNull PatchBuilder patchBuilder,
                                       @NotNull CommitContext commitContext)