package yocaml_git

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file yocaml_git.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
let execute
  :  (module Runtime.RUNTIME) -> (module Mirage_clock.PCLOCK) -> ctx:Mimic.ctx
  -> ?author:string -> ?email:string -> ?comment:string -> string -> 'a Yocaml.Effect.t
  -> ('a, [> `Msg of string ]) result Lwt.t
  =
 fun (module Source) (module Pclock) ~ctx ?author ?email ?comment remote program ->
  let open Lwt.Syntax in
  let* store = Git_kv.connect ctx remote in
  let module Store = Git_kv.Make (Pclock) in
  Store.change_and_push ?author ?author_email:email ?message:comment store
  @@ fun store ->
  let module R0 =
    Runtime.Make (Source) (Pclock)
      (struct
        let store = store
      end)
  in
  let module R1 = Yocaml.Runtime.Make (R0) in
  R1.execute program
;;