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.
module type FS_ABSTR = sig ... endval patch :
(module FS_ABSTR with type root = 'a) ->
allow_unclean:bool ->
[ `Patch_file of string | `Patch_diffs of Patch.t list ] ->
'a ->
(Patch.operation list, exn) Stdlib.resultpatch FS_ABSTR ~allow_unclean ?patch_filename ~dir diffs applies a patch to given element by FS_ABSTRACTION.
val parse_patch : translate:string option -> string -> Patch.t listparse_patch ~translate 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.
}
on dir. Otherwise, no translation done.