mgit: print error if change_and_push failed (as suggested by @reynir)

This commit is contained in:
Hannes Mehnert 2022-11-05 17:01:33 +01:00
parent cb37018a84
commit ad55d4888e

View file

@ -140,7 +140,8 @@ let repl store fd_in =
| [ "quit"; ] -> Lwt.return ()
| [ "fold"; ] ->
Store.change_and_push store0 (fun store1 -> go store1)
>>= fun _ -> go store0
>|= Result.fold ~ok:Fun.id ~error:(function `Msg msg -> Fmt.epr "%s.\n%!" msg)
>>= fun () -> go store0
| [ "save"; filename ] ->
save store0 filename >|= ignore
>>= fun _ -> if is_a_tty then Fmt.pr "\n%!" ; go store0