package conex

  1. Overview
  2. Docs

Module Conex_diffSource

Diff: decode patch files into hunks.

Sourcetype hunk

A hunk

Sourceval pp_hunk : Format.formatter -> hunk -> unit
Sourcetype operation =
  1. | Edit of string
  2. | Rename of string * string
  3. | Delete of string
  4. | Create of string
  5. | Rename_only of string * string
Sourceval pp_operation : git:bool -> Format.formatter -> operation -> unit
Sourceval operation_eq : operation -> operation -> bool
Sourcetype t = {
  1. operation : operation;
  2. hunks : hunk list;
  3. mine_no_nl : bool;
  4. their_no_nl : bool;
}

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

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

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

Sourceval 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.

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

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

OCaml

Innovation. Community. Security.