ocaml-git icon indicating copy to clipboard operation
ocaml-git copied to clipboard

Add a simple function to push a new file in the fly

Open dinosaure opened this issue 3 years ago • 0 comments

It could be interesting to have a special function and the purpose of it is to push only a new file into a remote Git repository. In some cases, it can be interesting where a unikernel does not really need a internal store but it mostly wants to save something remotly.

val push_new_file : Mimic.ctx -> Smart_git.Endpoint.t -> path:Fpath.t -> contents:string -> (unit, [> `Conflict |  `Msg of string ]) Lwt.t

The Conflict error appears if the path already exists remotely.

dinosaure avatar Mar 17 '22 12:03 dinosaure