Module Platform_repo.Url

A Url for a platform repo that is suitable to perform vcs operations, such as clone.

type t = {
  1. platform : Platform.t;
  2. vcs_kind : Vcs_kind.t;
  3. user_handle : User_handle.t;
  4. repo_name : Repo_name.t;
  5. protocol : Protocol.t;
}
val compare : t -> t -> int
val equal : t -> t -> bool
val hash : t -> int
val seeded_hash : int -> t -> int
val sexp_of_t : t -> Sexplib0.Sexp.t
val to_string : t -> ssh_syntax:Ssh_syntax.t -> string

Create a complete string suitable for use with git commands, such as remote add, clone, etc.

val to_url_string : t -> string

This produces the url in a normalized form where ssh addresses are written using the Url_style syntax. Most vcs clients should be compatible with this.

If you are looking for some kind of systematic representation, you may probably prefer this over to_platform_string.

val to_platform_string : t -> string

This is the same as to_string where the ssh_syntax parameter is determined by Ssh_syntax.used_by_default_on_platform.

val of_string : string -> (t, [ `Msg of string ]) Stdlib.Result.t

Parse a string into a url. This is able to parse both ssh syntaxes.

val v : string -> t

A wrapper for of_string that raises Invalid_argument on invalid input.