package datakit-github

  1. Overview
  2. Docs

GitHub Diffs

type t = Snapshot.diff

The type for differences between GitHub states.

val pp : t Fmt.t

pp is the pretty-printer for diffs.

val compare : t -> t -> int

compare_diff is the comparison function for diffs.

val commit_message : t -> string

commit_message d is the commit message corresponding to the diff d.

val empty : t

empty is the empty diff.

val is_empty : t -> bool

is_empty d is true if d is empty.

val update : t -> Elt.Set.t

update d are the elements in d which needs to be added or updated.

val remove : t -> Elt.IdSet.t

remove d are the elements in d which needs to be deleted.

val apply : t -> Snapshot.t -> Snapshot.t

snapsho d s applies d on top of the snapshot s.

val with_update : Elt.t -> t -> t

with_update e d is d augmented with the update of e.

val with_remove : Elt.id -> t -> t

with_remove e d is d augmented with the removal of e.