package irmin

  1. Overview
  2. Docs
On This Page
  1. Branch Store
Legend:
Library
Module
Module type
Parameter
Class
Class type

Manipulate branches.

Branch Store

Manipulate relations between branches and commits.

val mem : Repo.t -> branch -> bool Lwt.t

mem r b is true iff b is present in r.

val find : Repo.t -> branch -> commit option Lwt.t

find r b is Some c iff c is bound to b in t. It is None if b is not present in t.

val get : Repo.t -> branch -> commit Lwt.t

get t b is similar to find but raise Invalid_argument if b is not present in t.

val set : Repo.t -> branch -> commit -> unit Lwt.t

set t b c bounds c to b in t.

val remove : Repo.t -> branch -> unit Lwt.t

remove t b removes b from t.

val list : Repo.t -> branch list Lwt.t

list t is the list of branches present in t.

val watch : Repo.t -> branch -> ?init:commit -> (commit Irmin.diff -> unit Lwt.t) -> watch Lwt.t

watch t b f calls f on every change in b.

val watch_all : Repo.t -> ?init:(branch * commit) list -> (branch -> commit Irmin.diff -> unit Lwt.t) -> watch Lwt.t

watch_all t f calls f on every branch-related change in t, including creation/deletion events.

Base functions for branches.

include Irmin.Branch.S with type t = branch

Signature for Branches

type t = branch

The type for branches.

val t : t Irmin.Type.t

t is the value type for t.

val pp : t Fmt.t

pp pretty-prints branches.

val of_string : string -> (t, [ `Msg of string ]) Result.result

of_string parses branch names.

val master : t

The name of the master branch.

val is_valid : t -> bool

Check if the branch is valid.

OCaml

Innovation. Community. Security.