OpamPatchtranslate_patch ~dir input_patch output_patch writes a copy of input_patch to output_patch as though input_patch had been applied in dir. The patch is rewritten such that if text files have different line endings then the patch is transformed to patch using the encoding on disk. In particular, this means that patches generated against Unix checkouts of Git sources will correctly apply to Windows checkouts of the same sources.
val patch :
allow_unclean:bool ->
?patch_filename:string ->
dir:string ->
Patch.t list ->
unitpatch ~allow_unclean ?patch_filename ~dir diffs applies a patch to directory dir.
val parse_patch : dir:string -> file:string -> Patch.t listparse_patch ~dir patch_file processes and parses a patch file. Returns the parsed patch diffs or raises Not_found if the patch file doesn't exist or can't be parsed.