private static void write(@NotNull Project project,
                            @NotNull Writer writer,
                            @Nullable Path basePath,
                            @NotNull List<? extends FilePatch> patches,
                            @Nullable String commitMessage,
                            @Nullable CommitContext commitContext) throws IOException {
    String lineSeparator = CodeStyle.getSettings(project).getLineSeparator();
    UnifiedDiffWriter.writeCommitMessageHeader(project, writer, lineSeparator, commitMessage);
    UnifiedDiffWriter.write(project, basePath, patches, writer, lineSeparator, commitContext, null);
    BinaryPatchWriter.writeBinaries(basePath, ContainerUtil.findAll(patches, BinaryFilePatch.class), writer);
  }
private static void write(@NotNull Project project,
                            @NotNull Writer writer,
                            @Nullable Path basePath,
                            @NotNull List<? extends FilePatch> patches,
                            @Nullable String commitMessage,
                            @Nullable CommitContext commitContext)