From 8e8f002d5ec846c124ec5ad1dd5155685d85f381 Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Tue, 27 Sep 2022 17:09:48 +0200 Subject: [PATCH] revive get_partial and size (needed by mirage-kv 5) --- src/git_kv.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/git_kv.ml b/src/git_kv.ml index 672110a..a6dba20 100644 --- a/src/git_kv.ml +++ b/src/git_kv.ml @@ -429,7 +429,7 @@ let get t key = | Blob b -> Ok (Git.Blob.to_string b) | _ -> Error (`Value_expected key) -let _get_partial t key ~offset ~length = +let get_partial t key ~offset ~length = let open Lwt_result.Infix in get t key >|= fun data -> if String.length data < offset then @@ -486,7 +486,7 @@ let digest t key = ~some:(fun x -> Ok (Store.Hash.to_hex x)) t.head |> Lwt.return -let _size t key = +let size t key = let open Lwt_result.Infix in get t key >|= fun data -> String.length data