From ad09080ee61ad8de5fe9ca09da6764c10c2ba951 Mon Sep 17 00:00:00 2001 From: Romain Calascibetta Date: Wed, 21 Sep 2022 12:02:19 +0200 Subject: [PATCH] Remove an assert false and return an error instead of --- src/git_kv.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/git_kv.ml b/src/git_kv.ml index e41abed..97375be 100644 --- a/src/git_kv.ml +++ b/src/git_kv.ml @@ -132,7 +132,7 @@ let get t key = | Some blob -> Store.read_exn t.store blob >|= function | Blob b -> Ok (Git.Blob.to_string b) - | _ -> assert false + | _ -> Error (`Value_expected key) let get_partial t key ~offset ~length = let open Lwt_result.Infix in