And don't forget to set the reference with the last commit
This commit is contained in:
parent
d1cfefb53b
commit
bc99b9d25f
1 changed files with 3 additions and 0 deletions
|
@ -498,6 +498,7 @@ module Make (Pclock : Mirage_clock.PCLOCK) = struct
|
|||
let commit = Store.Value.Commit.make ~tree:tree_root_hash ~author ~committer
|
||||
~parents (Some "Committed by git-kv") in
|
||||
Store.write t.store (Git.Value.Commit commit) >>= fun (hash, _) ->
|
||||
Store.Ref.write t.store t.branch (Git.Reference.uid hash) >>= fun () ->
|
||||
Lwt.Infix.(if push then
|
||||
Sync.push ~capabilities ~ctx:t.ctx t.edn t.store [ `Update (t.branch, t.branch) ]
|
||||
>|= Result.map_error (fun err -> `Msg (Fmt.str "error pushing branch %a: %a"
|
||||
|
@ -547,6 +548,7 @@ module Make (Pclock : Mirage_clock.PCLOCK) = struct
|
|||
let commit = Store.Value.Commit.make ~tree:tree_root_hash ~author ~committer
|
||||
~parents:[ head ] (Some "Committed by git-kv") in
|
||||
Store.write t.store (Git.Value.Commit commit) >>= fun (hash, _) ->
|
||||
Store.Ref.write t.store t.branch (Git.Reference.uid hash) >>= fun () ->
|
||||
Lwt.Infix.(if push then
|
||||
Sync.push ~capabilities ~ctx:t.ctx t.edn t.store [ `Update (t.branch, t.branch) ]
|
||||
>|= Result.map_error (fun err -> `Msg (Fmt.str "error pushing branch %a: %a"
|
||||
|
@ -569,6 +571,7 @@ module Make (Pclock : Mirage_clock.PCLOCK) = struct
|
|||
let commit = Store.Value.Commit.make ~tree:tree_root_hash ~author ~committer
|
||||
~parents:[ head ] (Some "Committed by git-kv") in
|
||||
Store.write t.store (Git.Value.Commit commit) >>= fun (hash, _) ->
|
||||
Store.Ref.write t.store t.branch (Git.Reference.uid hash) >>= fun () ->
|
||||
Lwt.Infix.(if push then
|
||||
Sync.push ~capabilities ~ctx:t.ctx t.edn t.store [ `Update (t.branch, t.branch) ]
|
||||
>|= Result.map_error (fun err -> `Msg (Fmt.str "error pushing branch %a: %a"
|
||||
|
|
Loading…
Reference in a new issue