Print error and exit if we can't get commit id
This commit is contained in:
parent
8c7e71127f
commit
adf6564385
1 changed files with 4 additions and 1 deletions
|
@ -715,7 +715,10 @@ module Make
|
||||||
|
|
||||||
let commit_id git_kv =
|
let commit_id git_kv =
|
||||||
Store.digest git_kv Mirage_kv.Key.empty >|= fun r ->
|
Store.digest git_kv Mirage_kv.Key.empty >|= fun r ->
|
||||||
Result.get_ok r
|
Result.fold r ~ok:Fun.id
|
||||||
|
~error:(fun e ->
|
||||||
|
Logs.err (fun m -> m "%a" Store.pp_error e);
|
||||||
|
exit 2)
|
||||||
|
|
||||||
let repo commit =
|
let repo commit =
|
||||||
let upstream = List.hd (String.split_on_char '#' (Key_gen.remote ())) in
|
let upstream = List.hd (String.split_on_char '#' (Key_gen.remote ())) in
|
||||||
|
|
Loading…
Reference in a new issue