Skip to content

Commit

Permalink
irmin-git: expose Content_addressable type
Browse files Browse the repository at this point in the history
  • Loading branch information
art-w committed Sep 9, 2024
1 parent b1db6c3 commit bd25cd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/irmin-git/irmin_git.ml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ module Content_addressable (G : Git.S) = struct
let v ?dotgit:_ _root = assert false
end

module type S = Irmin.Content_addressable.S with type key = G.Hash.t
module type S = Irmin.Content_addressable.S with type _ t = G.t and type key = G.Hash.t

module Maker = Maker_ext (G) (No_sync)

Expand All @@ -125,11 +125,12 @@ module Content_addressable (G : Git.S) = struct
module M = Maker.Make (Schema)
module X = M.Backend.Contents

type 'a t = G.t

let state t =
let+ r = M.repo_of_git (snd t) in
let+ r = M.repo_of_git t in
M.Backend.Repo.contents_t r

type 'a t = bool ref * G.t
type key = X.key
type value = X.value

Expand Down
2 changes: 1 addition & 1 deletion src/irmin-git/irmin_git_intf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ module type Sigs = sig
(** Use Git as a content-addressable store. Values will be stored into
[.git/objects].*)

module type S = Irmin.Content_addressable.S with type key = G.Hash.t
module type S = Irmin.Content_addressable.S with type _ t = G.t and type key = G.Hash.t

module Make (V : Irmin.Type.S) : S with type value = V.t
end
Expand Down

0 comments on commit bd25cd4

Please sign in to comment.