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