package irmin-fs

  1. Overview
  2. Docs

Repositories.

Repositories

A repository contains a set of branches.

type t = repo

The type of repository handles.

val v : Irmin.config -> t Lwt.t

v config connects to a repository in a backend-specific manner.

val heads : t -> commit list Lwt.t

heads is Head.list.

val branches : t -> branch list Lwt.t

branches is Branch.list.

val export : ?full:bool -> ?depth:int -> ?min:commit list -> ?max:commit list -> t -> slice Lwt.t

export t ~depth ~min ~max exports the store slice between min and max, using at most depth history depth (starting from the max).

If max is not specified, use the current heads. If min is not specified, use an unbound past (but can still be limited by depth).

depth is used to limit the depth of the commit history. None here means no limitation.

If full is set (default is true), the full graph, including the commits, nodes and contents, is exported, otherwise it is the commit history graph only.

val import : t -> slice -> (unit, [ `Msg of string ]) Result.result Lwt.t

import t s imports the contents of the slice s in t. Does not modify branches.

OCaml

Innovation. Community. Security.