package git

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

Module Loose.MakeSource

Parameters

module H : sig ... end
module FS : sig ... end
module I : sig ... end
module D : sig ... end

Signature

Sourcemodule FS = FS
Sourcemodule Value : Value.S with module Hash := H and module Deflate := D and module Inflate := I
include module type of Value with module Blob = Blob.Make(H) with module Commit = Commit.Make(H) with module Tree = Tree.Make(H) with module Tag = Tag.Make(H) with type t = Value.Make(H)(I)(D).t
Sourcemodule Blob = Blob.Make(H)
Sourcemodule Commit = Commit.Make(H)
Sourcemodule Tree = Tree.Make(H)
Sourcemodule Tag = Tag.Make(H)
Sourcetype t = Value.Make(H)(I)(D).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.

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

kind o returns the kind of the Git object.

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

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

Sourcemodule MakeMeta (Meta : Encore.Meta.S) : sig ... end
Sourcemodule A : sig ... end
Sourcemodule M : sig ... end
Sourcemodule D : sig ... end
Sourcemodule E : sig ... end
Sourceval digest : t -> H.t
Sourceval pp : t Fmt.t
Sourceval compare : t -> t -> int
Sourceval hash : t -> int
Sourceval equal : t -> t -> bool
Sourcemodule Set : Set.S with type elt = t
Sourcemodule Map : Map.S with type key = t
Sourceval length : t -> int64
Sourcetype kind = [
  1. | `Commit
  2. | `Tree
  3. | `Tag
  4. | `Blob
]
Sourceval pp_error : error Fmt.t
Sourceval mem : fs:FS.t -> root:Fpath.t -> H.t -> bool Lwt.t
Sourceval read : fs:FS.t -> root:Fpath.t -> window:I.window -> ztmp:Cstruct.t -> dtmp:Cstruct.t -> raw:Cstruct.t -> H.t -> (t, error) result Lwt.t

read ~fs ~root ~window ~ztmp ~dtmp ~raw hash tries to extract from a loose file localized in root / objects a Git object. This function reads (uses raw buffer to read) the file, inflates (uses ztmp and window to inflate) and decodes (uses dtmp to decode) Git object and make a Value.t.

Sourceval read_inflated : fs:FS.t -> root:Fpath.t -> window:I.window -> ztmp:Cstruct.t -> dtmp:Cstruct.t -> raw:Cstruct.t -> H.t -> (kind * Cstruct.t, error) result Lwt.t

read_inflated ~fs ~root ~window ~ztmp ~dtmp ~raw hash tries to extract from a loose file localized in root / objects a Git object. This function reads (uses raw buffer to read) the file, inflates (uses ztmp and window to inflate) and decodes only Git header and body (uses dtmp to decode) Git object and make a fresh buffer.

Body is the serialization of the Git object, and, from kind (kind of Git object), client can call decoder associated to the kind returned (like Tree.Decoder for example).

Sourceval read_inflated_without_allocation : fs:FS.t -> root:Fpath.t -> window:I.window -> ztmp:Cstruct.t -> dtmp:Cstruct.t -> raw:Cstruct.t -> result:Cstruct.t -> H.t -> (kind * Cstruct.t, error) result Lwt.t

read_inflated_without_allocation ~fs ~root ~window ~ztmp ~dtmp ~raw ~result hash is the same as read_inflated. However, instead to make a fresh buffer which will contain the Git object serialized, it uses result to store it. This function does not allocate any buffer.

Sourceval list : fs:FS.t -> root:Fpath.t -> H.t list Lwt.t
Sourceval size : fs:FS.t -> root:Fpath.t -> window:I.window -> ztmp:Cstruct.t -> dtmp:Cstruct.t -> raw:Cstruct.t -> H.t -> (int64, error) result Lwt.t
Sourceval write : fs:FS.t -> root:Fpath.t -> temp_dir:Fpath.t -> etmp:Cstruct.t -> ?level:int -> ztmp:Cstruct.t -> raw:Cstruct.t -> t -> (H.t * int, error) result Lwt.t
Sourceval write_deflated : fs:FS.t -> root:Fpath.t -> temp_dir:Fpath.t -> ?level:int -> raw:Cstruct.t -> kind:kind -> Cstruct.t -> (H.t, error) result Lwt.t
OCaml

Innovation. Community. Security.