From 32401c01b3801c1dfaebcba6cad3e6f6caa4e452 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Fri, 15 Nov 2019 17:19:15 +0100 Subject: [PATCH] irmin-unix: add support for the pack backend on the CLI --- irmin-unix.opam | 1 + src/irmin-unix/dune | 3 ++- src/irmin-unix/resolver.ml | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/irmin-unix.opam b/irmin-unix.opam index dc01cd67e5..8c3098dac4 100644 --- a/irmin-unix.opam +++ b/irmin-unix.opam @@ -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"} diff --git a/src/irmin-unix/dune b/src/irmin-unix/dune index 8f2b837c9b..296a1cd8e7 100644 --- a/src/irmin-unix/dune +++ b/src/irmin-unix/dune @@ -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)) diff --git a/src/irmin-unix/resolver.ml b/src/irmin-unix/resolver.ml index 561b7267b1..91ea5214c2 100644 --- a/src/irmin-unix/resolver.ml +++ b/src/irmin-unix/resolver.ml @@ -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 [ @@ -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