From f78d35225241e93a43ad53b187e392164a5ae17a Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sat, 28 Jun 2025 23:15:46 +0200 Subject: Harmonize resolvers error messages. --- lib/resolvers.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/resolvers.ml') diff --git a/lib/resolvers.ml b/lib/resolvers.ml index fa485e3..e7c9cd5 100644 --- a/lib/resolvers.ml +++ b/lib/resolvers.ml @@ -40,7 +40,7 @@ module Commit = struct let hash = Store.Hash.of_hex id in Lwt_result.bind (Store.read store hash) @@ function | Git.Value.Commit commit -> Lwt_result.return (to_t commit) - | _ -> Lwt_result.fail @@ `Msg (id ^ " does not point to a commit object") + | _ -> Lwt_result.fail @@ `Msg ("no commit matches id " ^ id) let head repo = let* store = store repo in @@ -89,7 +89,7 @@ module Branch = struct in match branch with | Some branch -> Lwt_result.return branch - | None -> Lwt_result.fail @@ `Msg ("Found no branch matching " ^ id) + | None -> Lwt_result.fail @@ `Msg ("no branch matches id " ^ id) end module Entry = struct @@ -122,7 +122,7 @@ module Tree = struct let hash = Store.Hash.of_hex id in Lwt_result.bind (Store.read store hash) @@ function | Git.Value.Tree tree -> Lwt_result.return (to_t tree) - | _ -> Lwt_result.fail @@ `Msg ("no tree for id " ^ id) + | _ -> Lwt_result.fail @@ `Msg ("no tree matches id " ^ id) let head repo = let* store = store repo in @@ -144,5 +144,5 @@ module Blob = struct let hash = Store.Hash.of_hex id in Lwt_result.bind (Store.read store hash) @@ function | Git.Value.Blob blob -> Lwt_result.return (to_t blob) - | _ -> Lwt_result.fail @@ `Msg (id ^ " does not point to a blob object") + | _ -> Lwt_result.fail @@ `Msg ("no blob matches id " ^ id) end -- cgit v1.2.3