Skip to content

Commit

Permalink
Merge pull request #888 from samoht/irmin-unix-pack
Browse files Browse the repository at this point in the history
irmin-unix: add support for the pack backend on the CLI
  • Loading branch information
samoht authored Nov 20, 2019
2 parents f3c4115 + 32401c0 commit 47883bc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions irmin-unix.opam
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ depends: [
"irmin-git" {>= "2.0.0"}
"irmin-http" {>= "2.0.0"}
"irmin-fs" {>= "2.0.0"}
"irmin-pack" {>= "2.0.0"}
"irmin-graphql"
"git-unix" {>= "1.11.4"}
"digestif" {>= "0.6.1"}
Expand Down
3 changes: 2 additions & 1 deletion src/irmin-unix/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(library
(name irmin_unix)
(public_name irmin-unix)
(libraries irmin irmin-fs irmin-git irmin-http git-unix irmin-mem irmin-graphql
(libraries irmin irmin-fs irmin-git irmin-http git-unix irmin-mem
irmin-graphql irmin-pack
irmin-watcher yaml cmdliner logs.fmt logs.cli fmt.cli fmt.tty))
9 changes: 9 additions & 0 deletions src/irmin-unix/resolver.ml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ module Store = struct

let git_mem (module C : Irmin.Contents.S) = v_git (module Xgit.Mem.KV (C))

module Inode_config = struct
let entries = 32

let stable_hash = 256
end

let pack = create (module Irmin_pack.Make (Inode_config))

let all =
ref
[
Expand All @@ -151,6 +159,7 @@ module Store = struct
("mem", mem);
("http", fun c -> http (mem c));
("http.git", fun c -> http (git c));
("pack", pack);
]

let default = ref git
Expand Down

0 comments on commit 47883bc

Please sign in to comment.