Sync.Make
Creates a lower-level Sync
functions fetch
and push
that are then overridden by backend-specific implementations such as Mem
and Git_unix
module Pack : Smart_git.APPEND with type +'a fiber = 'a Lwt.t
module Index : Smart_git.APPEND with type +'a fiber = 'a Lwt.t
module Store : sig ... end
type store = Store.t
val pp_error : error Fmt.t
val fetch :
?push_stdout:(string -> unit) ->
?push_stderr:(string -> unit) ->
?threads:int ->
ctx:Mimic.ctx ->
Smart_git.Endpoint.t ->
store ->
?version:[> `V1 ] ->
?capabilities:Smart.Capability.t list ->
?deepen:[ `Depth of int | `Timestamp of int64 ] ->
[ `All | `Some of (Reference.t * Reference.t) list | `None ] ->
src:Pack.uid ->
dst:Pack.uid ->
idx:Index.uid ->
create_idx_stream:(unit -> unit -> string option Lwt.t) ->
create_pack_stream:(unit -> unit -> string option Lwt.t) ->
Pack.t ->
Index.t ->
((hash * (Reference.t * hash) list) option, [> error ] as 'err) Stdlib.result
Lwt.t
fetches remote references and saves them. Behavior of fetch when want
is `All
- fetches all remote references and saves them in store `Some src_dst_pairs
- fetch src
and save in dst
`None
- doesn't save anything
val push :
ctx:Mimic.ctx ->
Smart_git.Endpoint.t ->
store ->
?version:[> `V1 ] ->
?capabilities:Smart.Capability.t list ->
[ `Create of Reference.t
| `Delete of Reference.t
| `Update of Reference.t * Reference.t ]
list ->
(unit, [> error ] as 'err) Stdlib.result Lwt.t