summaryrefslogtreecommitdiff
path: root/lib/resolvers.ml
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2025-06-28 23:15:46 +0200
committerMarius Peter <marius.peter@tutanota.com>2025-06-28 23:15:46 +0200
commitf78d35225241e93a43ad53b187e392164a5ae17a (patch)
tree9952f066f4d44efb54d3d1238f7c1c5671cadbc7 /lib/resolvers.ml
parent5e33ec0924d4c13ff1db3c05a0ae732beedfd85a (diff)
Harmonize resolvers error messages.
Diffstat (limited to 'lib/resolvers.ml')
-rw-r--r--lib/resolvers.ml8
1 files changed, 4 insertions, 4 deletions
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
Copyright 2019--2025 Marius PETER