123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157(*
* Copyright (c) 2013-2022 Thomas Gazagnaire <thomas@gazagnaire.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)moduletypeG=sigincludeGit.Svalv:?dotgit:Fpath.t->Fpath.t->(t,error)resultLwt.tendmoduletypeS=sig(** The Git backend specializes a few types:
- the allowed metadata are {!type-Metadata.t}.
- the hash algorithm is SHA1. *)moduleGit:Git.S(** Access to the underlying Git store. *)moduleSchema:Irmin.Schema.SwithtypeMetadata.t=Metadata.tandtypeHash.t=Git.hashincludeIrmin.Swithtypehash=Schema.Hash.tandmoduleSchema:=Schemavalgit_commit:Repo.t->commit->Git.Value.Commit.toptionLwt.t(** [git_commit repo h] is the commit corresponding to [h] in the repository
[repo]. *)valgit_of_repo:Repo.t->Git.t(** [of_repo r] is the Git store associated to [r]. *)valrepo_of_git:?head:Git.Reference.t->?bare:bool->?lock:Lwt_mutex.t->Git.t->Repo.tLwt.t(** [to_repo t] is the Irmin repository associated to [t]. *)end(** Same as {!Irmin.Maker} but with a fixed hash (SHA1) and metadata (Git
metadata) implemtations. *)moduletypeMaker=sigmoduleG:Gtypeendpoint=Mimic.ctx*Smart_git.Endpoint.tmoduleMake(Schema:Schema.SwithtypeHash.t=G.hashandtypeNode.t=G.Value.Tree.tandtypeCommit.t=G.Value.Commit.t):SwithmoduleGit=GandmoduleSchema:=SchemaandtypeBackend.Remote.endpoint=endpointendmoduletypeKV_maker=sigmoduleG:Gtypeendpoint=Mimic.ctx*Smart_git.Endpoint.ttypebranchmoduleMake(C:Irmin.Contents.S):SwithmoduleGit=GandtypeSchema.Contents.t=C.tandtypeSchema.Metadata.t=Metadata.tandtypeSchema.Info.t=Irmin.Info.defaultandtypeSchema.Path.step=stringandtypeSchema.Path.t=stringlistandtypeSchema.Hash.t=G.hashandtypeSchema.Branch.t=branchandtypeBackend.Remote.endpoint=endpointendmoduletypeSigs=sigmoduleMetadata=MetadatamoduleConf=ConfmoduleBranch=BranchmoduleReference=ReferencemoduleSchema=Schema(** {2 Module types} *)moduletypeG=GmoduletypeS=SmoduletypeMaker=MakermoduletypeKV_maker=KV_makervalconfig:?head:Git.Reference.t->?bare:bool->?level:int->?dot_git:string->?buffers:int->string->Irmin.configtypereference=Reference.t[@@derivingirmin]moduleContent_addressable(G:Git.S):sig(** Use Git as a content-addressable store. Values will be stored into
[.git/objects].*)moduletypeS=Irmin.Content_addressable.Swithtype_t=G.tandtypekey=G.Hash.tmoduleMake(V:Irmin.Type.S):Swithtypevalue=V.tendmoduleAtomic_write(G:Git.S):sig(** Use Git as an atomic-write store. Values will be stored into
[.git/refs]. When using the Git filesystem backend, branch names .*)moduletypeS=Irmin.Atomic_write.Swithtypevalue=G.Hash.tmoduleMake(K:Irmin.Branch.S):Swithtypekey=K.tendmoduleMaker(G:G)(S:Git.Sync.Swithtypehash:=G.hashandtypestore:=G.t):MakerwithmoduleG:=GmoduleKV(G:G)(S:Git.Sync.Swithtypehash:=G.hashandtypestore:=G.t):KV_makerwithmoduleG:=Gandtypebranch=stringmoduleRef(G:G)(S:Git.Sync.Swithtypehash:=G.hashandtypestore:=G.t):KV_makerwithmoduleG:=Gandtypebranch=Reference.tmoduleGeneric_KV(CA:Irmin.Content_addressable.Maker)(AW:Irmin.Atomic_write.Maker):Irmin.KV_makerwithtypeendpoint=unitandtypeinfo=Irmin.Info.default(** In-memory Git store. *)moduleMem:Gwithtypet=Digestif.SHA1.tGit.Mem.tandtypehash=Digestif.SHA1.tend