Remove an assert false, and silence warning 8

This commit is contained in:
Reynir Björnsson 2024-12-19 15:05:48 +01:00
parent e342f8539a
commit d2a0e526da

View file

@ -472,8 +472,10 @@ module Make (Pclock : Mirage_clock.PCLOCK) = struct
~none:Ptime.epoch ~none:Ptime.epoch
~some:Fun.id (Ptime.of_float_s (Int64.to_float (now ())))) ~some:Fun.id (Ptime.of_float_s (Int64.to_float (now ()))))
| None, Some head -> | None, Some head ->
Store.read_exn t.store head >|= function (* See https://github.com/ocaml/ocaml/issues/9301 why we have the
| Commit c -> intermediate [r] value. *)
let+ r = Store.read_exn t.store head in
let[@warning "-8"] Commit c = r in
let author = Git_commit.author c in let author = Git_commit.author c in
let secs, tz_offset = author.Git.User.date in let secs, tz_offset = author.Git.User.date in
let secs = let secs =
@ -491,7 +493,6 @@ module Make (Pclock : Mirage_clock.PCLOCK) = struct
~some:Fun.id (Ptime.of_float_s (Int64.to_float secs)) ~some:Fun.id (Ptime.of_float_s (Int64.to_float secs))
in in
Ok ts Ok ts
| _ -> assert false
let digest t key = let digest t key =
let open Lwt.Infix in let open Lwt.Infix in