public static ApplyFilePatchBase<?> createGeneral(@NotNull FilePatch patch) {
    if (patch instanceof TextFilePatch) {
      return create((TextFilePatch) patch);
    } else if (patch instanceof BinaryFilePatch) {
      return create((BinaryFilePatch) patch);
    } else if (patch instanceof ShelvedBinaryFilePatch) {
      return create((ShelvedBinaryFilePatch) patch);
    }
    throw new IllegalStateException();
  }
public static ApplyFilePatchBase<?> createGeneral(@NotNull FilePatch patch)