mgit: print error if change_and_push failed (as suggested by @reynir)
This commit is contained in:
parent
cb37018a84
commit
ad55d4888e
1 changed files with 2 additions and 1 deletions
|
@ -140,7 +140,8 @@ let repl store fd_in =
|
||||||
| [ "quit"; ] -> Lwt.return ()
|
| [ "quit"; ] -> Lwt.return ()
|
||||||
| [ "fold"; ] ->
|
| [ "fold"; ] ->
|
||||||
Store.change_and_push store0 (fun store1 -> go store1)
|
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"; filename ] ->
|
||||||
save store0 filename >|= ignore
|
save store0 filename >|= ignore
|
||||||
>>= fun _ -> if is_a_tty then Fmt.pr "\n%!" ; go store0
|
>>= fun _ -> if is_a_tty then Fmt.pr "\n%!" ; go store0
|
||||||
|
|
Loading…
Reference in a new issue