[OCaml] Mobile-friendly clone of cgit.
Consistently use Lwt_result.
lib/git_helpers.ml
@@ -34,8 +34,8 @@
34
34
author = Store.Value.Commit.author c;
35
35
message = Store.Value.Commit.message c;
36
36
}
37
Removed:
| Ok _ -> Lwt.return_error (`Msg "object is not a commit")
38
Removed:
| Error e -> Lwt.return_error e
37
Added:
| Ok _ -> Lwt_result.fail (`Msg "object is not a commit")
38
Added:
| Error e -> Lwt_result.fail e
39
39
40
40
let recent_commits repo_path n =
41
41
let open Lwt_result.Syntax in
@@ -45,7 +45,7 @@
45
45
if count = 0 then Lwt_result.return (List.rev acc)
46
46
else
47
47
of_hash store hash >>= function
48
Removed:
| Error e -> Lwt.return_error e
48
Added:
| Error e -> Lwt_result.fail e
49
49
| Ok commit -> (
50
50
match commit.parents with
51
51
| parent :: _ ->