package git

  1. Overview
  2. Docs
Git format and protocol in pure OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

git-3.6.0.tbz
sha256=b148810ea65aef76503a0fd5deb351fa7307fd29f06ce93fdf43cc7add5c1b45
sha512=73e0a7ab2bf00102653ac14d47ac62f3dddcdb0e24f7c5e33226801331cf608bcbfba2f058b5cb612ba9313d6ab12b2d01556169239e5fb18ef1c14a9b1c1eaf

doc/smart_git/Smart_git/index.html

Module Smart_gitSource

Sourcemodule type APPEND = sig ... end
Sourcemodule type UID = sig ... end
Sourcemodule type HTTP = sig ... end
Sourcemodule Endpoint : sig ... end

Mimic values.

When the user use an Endpoint.t to Make.fetch or Make.push, we fill the given Mimic's ctx with some available informations such as:

  • if we want to Make.fetch (`Rd) or Make.push (`Wr)
  • the scheme/protocol that the user would like to use (git://, SSH or HTTP - with or without TLS)
  • the path of the git repository
  • the host (an IP adress or a domain name)
  • the SSH user iff the user would like to use SSH
  • the port that the user would like to use

From this informations, the end-user can process them through the Mimic API (with Mimic.fold) and describe how to create needed values to start a protocol from them.

For example, if the user wants to use mirage-tcpip which needs an IP address and a port, he is able to re-use/map/fold git_host and git_port to craft what mirage-tcpip really needs.

Of course, such job is definitely outside the scope of ocaml-git and permits to us to be free about protocol implementations. An example of the plumbing needed is able with git-mirage which re-use these values to be able to start a mirage-tcpip connection, a awa-ssh connection of a cohttp (with or without ocaml-tls) connection.

Sourceval git_capabilities : [ `Rd | `Wr ] Mimic.value
Sourceval git_scheme : [ `Git | `SSH | `HTTP | `HTTPS | `Scheme of string ] Mimic.value
Sourceval git_path : string Mimic.value
Sourceval git_host : [ `Addr of Ipaddr.t | `Domain of [ `host ] Domain_name.t | `Name of string ] Mimic.value
Sourceval git_ssh_user : string Mimic.value
Sourceval git_port : int Mimic.value
Sourcemodule Make (Scheduler : Sigs.SCHED with type +'a s = 'a Lwt.t) (Pack : APPEND with type +'a fiber = 'a Lwt.t) (Index : APPEND with type +'a fiber = 'a Lwt.t) (HTTP : HTTP) (Uid : UID) (Ref : Sigs.REF) : sig ... end
OCaml

Innovation. Community. Security.

On This Page
  1. Mimic values.