Skip to content

Commit

Permalink
Upgrade the unikernel example with the new API
Browse files Browse the repository at this point in the history
  • Loading branch information
dinosaure committed Feb 18, 2021
1 parent 171a333 commit 363613e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unikernel/unikernel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ struct
let empty_commit git = function
| None ->
Store.write git empty_tree >>? fun (tree, _) ->
Store.write git (commit ~tree ~author:(author ()) ".") >>? fun (hash, _) ->
Store.write git (commit ~tree ~author:(author ()) None) >>? fun (hash, _) ->
Store.Ref.write git Git.Reference.master (Git.Reference.uid hash)
| Some (_, _) ->
Store.Ref.resolve git Git.Reference.master >>= failwith Store.pp_error >>= fun hash ->
Store.read_exn git hash >>= fun obj ->
let[@warning "-8"] Git.Value.Commit parent = obj in
let tree = Store.Value.Commit.tree parent in
Store.write git (commit ~parent:hash ~tree ~author:(author ()) ".") >>? fun (hash, _) ->
Store.write git (commit ~parent:hash ~tree ~author:(author ()) None) >>? fun (hash, _) ->
Store.Ref.write git Git.Reference.master (Git.Reference.uid hash)

let capabilities =
Expand Down

0 comments on commit 363613e

Please sign in to comment.