val patch_prefix : string
val patch_suffix : string
val add_file_prefix : string
val delete_file_prefix : string
val update_file_prefix : string
val move_file_to_prefix : string
val end_of_file_prefix : string
val hunk_add_line_prefix : char
type action_kind =
| Add
| Delete
| Update
type file_change = {
kind : action_kind;
old_text : string option;
new_text : string option;
move_path : string option;
}
type chunk = {
mutable orig_index : int;
del_lines : string list;
ins_lines : string list;
}
type patch_action = {
kind : action_kind;
new_file : string option;
chunks : chunk list;
move_path : string option;
}
exception Diff_error of string
module Canon : sig ... end
val slc : 'a list -> int -> int -> 'a list
val join : string list -> string
val find_context_core :
lines:string list ->
context:string list ->
start:int ->
int * int
val find_context :
lines:string list ->
context:string list ->
start:int ->
eof:bool ->
int * int
val peek_next_section :
string array ->
idx0:int ->
string list * chunk list * int * bool
val identify_files_added : string -> string list
val list_slice : 'a list -> pos:int -> len:int -> 'a list
val updated_file_old :
orig_text:string ->
patch_action ->
path:string ->
string
val updated_file : orig_text:string -> patch_action -> path:string -> string
val process_patch :
text:string ->
open_fn:(string -> string) ->
write_fn:(string -> string -> unit) ->
remove_fn:(string -> unit) ->
string