From 6a79498f38ff35aa14eedb69d70a0bfd55cf6841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Wed, 15 Nov 2023 12:05:13 +0100 Subject: [PATCH] Yocaml_git: Allow specifying a commit message --- lib/yocaml_git/yocaml_git.ml | 6 +++--- lib/yocaml_git/yocaml_git.mli | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/yocaml_git/yocaml_git.ml b/lib/yocaml_git/yocaml_git.ml index e70b6b0..d19664b 100644 --- a/lib/yocaml_git/yocaml_git.ml +++ b/lib/yocaml_git/yocaml_git.ml @@ -1,13 +1,13 @@ let execute : (module Runtime.RUNTIME) -> (module Mirage_clock.PCLOCK) -> ctx:Mimic.ctx - -> ?author:string -> ?email:string -> string -> 'a Yocaml.Effect.t + -> ?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 remote program -> + 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 store + Store.change_and_push ?author ?author_email:email ?message:comment store @@ fun store -> let module R0 = Runtime.Make (Source) (Pclock) diff --git a/lib/yocaml_git/yocaml_git.mli b/lib/yocaml_git/yocaml_git.mli index 8d90195..b0e12f4 100644 --- a/lib/yocaml_git/yocaml_git.mli +++ b/lib/yocaml_git/yocaml_git.mli @@ -16,6 +16,7 @@ val execute -> ctx:Mimic.ctx -> ?author:string -> ?email:string + -> ?comment:string -> string -> 'a Yocaml.Effect.t -> ('a, [> `Msg of string ]) result Lwt.t