package irmin-git

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

The Git backend specializes a few types:

  • the allowed metadata are Metadata.t.
  • the hash algorithm is SHA1.

Parameters

module G : G
module S : Git.Sync.S with type hash = G.hash and type store = G.t
module C : Irmin.Contents.S

Signature

module Git = G

Access to the underlying Git store.

include Irmin.S with type metadata = Metadata.t and type hash = Git.hash with type key = string list with type step = string with type contents = C.t with type branch = string with type Private.Sync.endpoint = Mimic.ctx * Smart_git.Endpoint.t
type repo
type t
type step = string
type key = string list
type metadata = Metadata.t
type contents = C.t
type node
type tree
type hash = Git.hash
type commit
type branch = string
type slice
type lca_error = [
  1. | `Max_depth_reached
  2. | `Too_many_lcas
]
type ff_error = [
  1. | `Max_depth_reached
  2. | `No_change
  3. | `Rejected
  4. | `Too_many_lcas
]
module Repo : sig ... end
val empty : repo -> t Lwt.t
val master : repo -> t Lwt.t
val of_branch : repo -> branch -> t Lwt.t
val of_commit : commit -> t Lwt.t
val repo : t -> repo
val tree : t -> tree Lwt.t
module Status : sig ... end
val status : t -> Status.t
module Head : sig ... end
module Hash : sig ... end
module Commit : sig ... end
module Contents : sig ... end
module Tree : sig ... end
val kind : t -> key -> [ `Contents | `Node ] option Lwt.t
val list : t -> key -> (step * tree) list Lwt.t
val mem : t -> key -> bool Lwt.t
val mem_tree : t -> key -> bool Lwt.t
val find_all : t -> key -> (contents * metadata) option Lwt.t
val find : t -> key -> contents option Lwt.t
val get_all : t -> key -> (contents * metadata) Lwt.t
val get : t -> key -> contents Lwt.t
val find_tree : t -> key -> tree option Lwt.t
val get_tree : t -> key -> tree Lwt.t
val hash : t -> key -> hash option Lwt.t
type write_error = [
  1. | `Conflict of string
  2. | `Test_was of tree option
  3. | `Too_many_retries of int
]
val set : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> t -> key -> contents -> (unit, write_error) Stdlib.result Lwt.t
val set_exn : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> t -> key -> contents -> unit Lwt.t
val set_tree : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> t -> key -> tree -> (unit, write_error) Stdlib.result Lwt.t
val set_tree_exn : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> t -> key -> tree -> unit Lwt.t
val remove : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> t -> key -> (unit, write_error) Stdlib.result Lwt.t
val remove_exn : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> t -> key -> unit Lwt.t
val test_and_set : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> t -> key -> test:contents option -> set:contents option -> (unit, write_error) Stdlib.result Lwt.t
val test_and_set_exn : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> t -> key -> test:contents option -> set:contents option -> unit Lwt.t
val test_and_set_tree : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> t -> key -> test:tree option -> set:tree option -> (unit, write_error) Stdlib.result Lwt.t
val test_and_set_tree_exn : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> t -> key -> test:tree option -> set:tree option -> unit Lwt.t
val merge : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> old:contents option -> t -> key -> contents option -> (unit, write_error) Stdlib.result Lwt.t
val merge_exn : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> old:contents option -> t -> key -> contents option -> unit Lwt.t
val merge_tree : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> old:tree option -> t -> key -> tree option -> (unit, write_error) Stdlib.result Lwt.t
val merge_tree_exn : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> info:Irmin__.Info.f -> old:tree option -> t -> key -> tree option -> unit Lwt.t
val with_tree : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> ?strategy:[ `Merge | `Set | `Test_and_set ] -> info:Irmin__.Info.f -> t -> key -> (tree option -> tree option Lwt.t) -> (unit, write_error) Stdlib.result Lwt.t
val with_tree_exn : ?retries:int -> ?allow_empty:bool -> ?parents:commit list -> ?strategy:[ `Merge | `Set | `Test_and_set ] -> info:Irmin__.Info.f -> t -> key -> (tree option -> tree option Lwt.t) -> unit Lwt.t
val clone : src:t -> dst:branch -> t Lwt.t
type watch
val watch : t -> ?init:commit -> (commit Irmin__.S.diff -> unit Lwt.t) -> watch Lwt.t
val watch_key : t -> key -> ?init:commit -> ((commit * tree) Irmin__.S.diff -> unit Lwt.t) -> watch Lwt.t
val unwatch : watch -> unit Lwt.t
type !'a merge = info:Irmin__.Info.f -> ?max_depth:int -> ?n:int -> 'a -> (unit, Irmin__.Merge.conflict) Stdlib.result Lwt.t
val merge_into : into:t -> t merge
val merge_with_branch : t -> branch merge
val merge_with_commit : t -> commit merge
val lcas : ?max_depth:int -> ?n:int -> t -> t -> (commit list, lca_error) Stdlib.result Lwt.t
val lcas_with_branch : t -> ?max_depth:int -> ?n:int -> branch -> (commit list, lca_error) Stdlib.result Lwt.t
val lcas_with_commit : t -> ?max_depth:int -> ?n:int -> commit -> (commit list, lca_error) Stdlib.result Lwt.t
module History : sig ... end
val history : ?depth:int -> ?min:commit list -> ?max:commit list -> t -> History.t Lwt.t
val last_modified : ?depth:int -> ?n:int -> t -> key -> commit list Lwt.t
module Branch : sig ... end
module Key : sig ... end
module Metadata : sig ... end
val step_t : step Irmin__.Type.t
val key_t : key Irmin__.Type.t
val metadata_t : metadata Irmin__.Type.t
val contents_t : contents Irmin__.Type.t
val node_t : node Irmin__.Type.t
val tree_t : tree Irmin__.Type.t
val commit_t : repo -> commit Irmin__.Type.t
val branch_t : branch Irmin__.Type.t
val slice_t : slice Irmin__.Type.t
val kind_t : [ `Contents | `Node ] Irmin__.Type.t
val lca_error_t : lca_error Irmin__.Type.t
val ff_error_t : ff_error Irmin__.Type.t
val write_error_t : write_error Irmin__.Type.t
module Private : sig ... end
type Irmin__.S.remote +=
  1. | E of Private.Sync.endpoint
val to_private_node : node -> Private.Node.value Tree.or_error Lwt.t
val of_private_node : repo -> Private.Node.value -> node
val to_private_commit : commit -> Private.Commit.value
val of_private_commit : repo -> Private.Commit.value -> commit
val save_contents : [> Irmin__.Import.write ] Private.Contents.t -> contents -> hash Lwt.t
val save_tree : ?clear:bool -> repo -> [> Irmin__.Import.write ] Private.Contents.t -> [> Irmin__.Import.read_write ] Private.Node.t -> tree -> hash Lwt.t
val git_commit : Repo.t -> commit -> Git.Value.Commit.t option Lwt.t

git_commit repo h is the commit corresponding to h in the repository repo.

val git_of_repo : Repo.t -> Git.t

of_repo r is the Git store associated to r.

val repo_of_git : ?head:Git.Reference.t -> ?bare:bool -> ?lock:Lwt_mutex.t -> Git.t -> Repo.t Lwt.t

to_repo t is the Irmin repository associated to t.

OCaml

Innovation. Community. Security.