public static void writePatches(@NotNull Project project,
                                  @NotNull Path file,
                                  @Nullable Path basePath,
                                  @NotNull List<? extends FilePatch> patches,
                                  @Nullable CommitContext commitContext,
                                  @NotNull Charset charset) throws IOException {
    writePatches(project, file, basePath, patches, null, commitContext, charset);
  }
public static void writePatches(@NotNull Project project,
                                  @NotNull Path file,
                                  @Nullable Path basePath,
                                  @NotNull List<? extends FilePatch> patches,
                                  @Nullable CommitContext commitContext,
                                  @NotNull Charset charset)