package git

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

The functor to make the OCaml representation of the Git object by a specific hash implementation, an S.INFLATE implementation for the decompression and a S.DEFLATE implementation for the compression.

The constraints on git objects can cut the path to let the user to make the value module and keep the structural equality. If the Hash module is the same. That means:

```ocaml module V1 = Value.Make(SHA1)(C_inflate)(C_deflate) module V2 = Value.Make(SHA1)(OCaml_inflate)(OCaml_deflate) ```

Types V1.t and V2.t are equal.

Parameters

module Hash : sig ... end
module Inflate : sig ... end
module Deflate : sig ... end

Signature

module Blob = Blob.Make(Hash)
module Commit = Commit.Make(Hash)
module Tree = Tree.Make(Hash)
module Tag = Tag.Make(Hash)
type t =
  1. | Blob of Blob.t
    (*

    The Blob.t OCaml value.

    *)
  2. | Commit of Commit.t
    (*

    The Commit.t OCaml value.

    *)
  3. | Tree of Tree.t
    (*

    The Tree.t OCaml value.

    *)
  4. | Tag of Tag.t
    (*

    The Tag.t OCaml value.

    *)

OCaml value which represents a Git object.

val blob : Blob.t -> t
val commit : Commit.t -> t
val tree : Tree.t -> t
val tag : Tag.t -> t
val kind : t -> [ `Commit | `Blob | `Tree | `Tag ]

kind o returns the kind of the Git object.

val pp_kind : [ `Commit | `Blob | `Tree | `Tag ] Fmt.t

pp_kind ppf kind is a human readable pretty-printer of kind.

module MakeMeta (Meta : Encore.Meta.S) : sig ... end
module A : sig ... end
module M : sig ... end
module D : sig ... end
module E : sig ... end
val digest : t -> Hash.t
val pp : t Fmt.t
val compare : t -> t -> int
val hash : t -> int
val equal : t -> t -> bool
module Set : Set.S with type elt = t
module Map : Map.S with type key = t
val length : t -> int64
OCaml

Innovation. Community. Security.