Module Vcs.Repo_name

The name of a repository as configured on a platform such as GitHub.

This is the basename of the repository, usually composed of alphanumeric characters as well as a few special supported characters such as '-' or '_'.

On GitHub, the name of a repository is the last part of the URL, e.g. https://github.com/$USER_HANDLE/$REPO_NAME. For example, the repository that lives at the url https://github.com/mbarbin/vcs has a repo name equals to: Repo_name.v "vcs".

This module is part of the Vcs library for convenience. Note that on GitHub, multiple users may have a fork of the same repo, and thus the repo_name on its own is not sufficient to uniquely define a given repository. For this, the GitHub User_handle must be added. See Url for a complete url to a repository.

type 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 -> string

Given that t = string in the implementation, this function is just the identity.

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

of_string str returns Ok str if X.invariant str = true, and an error otherwise. This is meant to be used to validate untrusted entries.

val v : string -> t

v str is a convenient wrapper to build a t or raise Invalid_argument. This is typically handy for applying on trusted literals.