Module Backend.Remote

URI-based low-level remote synchronisation.

include Remote.S with type commit = Commit.key and type branch = Branch.key with type endpoint = endpoint

Remote synchronization

type t

The type for store handles.

type commit = Commit.key

The type for store heads.

type branch = Branch.key

The type for branch IDs.

type endpoint = endpoint

The type for sync endpoints.

val fetch : t -> ?depth:int -> endpoint -> branch -> (commit option, [ `Msg of string ]) Stdlib.result

fetch t uri fetches the contents of the remote store located at uri into the local store t. Return the head of the remote branch with the same name, which is now in the local store. No_head means no such branch exists.

val push : t -> ?depth:int -> endpoint -> branch -> (unit, [ `Msg of string | `Detached_head ]) Stdlib.result

push t uri pushes the contents of the local store t into the remote store located at uri.

val init : Repo.t -> t