Module Conex_diff

type hunk

A hunk

val pp_hunk : Stdlib.Format.formatter -> hunk -> unit
type operation =
| Edit of string
| Rename of string * string
| Delete of string
| Create of string
| Rename_only of string * string
val pp_operation : git:bool -> Stdlib.Format.formatter -> operation -> unit
val operation_eq : operation -> operation -> bool
type t = {
operation : operation;
hunks : hunk list;
mine_no_nl : bool;
their_no_nl : bool;
}

A diff is a list of hunks, and an operation.

val pp : git:bool -> Stdlib.Format.formatter -> t -> unit
val to_diffs : string -> t list

to_diffs str decodes the given patch into a list of diff.

val patch : string option -> t -> string option

patch data diff is data', which is the result of applying diff to data. If data' is None, it was deleted.

val ids : string -> Conex_utils.path -> t list -> (bool * Conex_utils.S.t, string) Stdlib.result

ids rootname keydir diffs returns whether the root file was changed, and the set of modified ids.