Variable: vc-clone-heuristic-alist
vc-clone-heuristic-alist is a customizable variable defined in
vc.el.gz.
Value
(("\\`https?://\\(?:\\(?:www\\.\\)?github\\.com/[._[:alnum:]-]+/[._[:alnum:]-]+\\|codeberg\\.org/[._[:alnum:]-]+/[._[:alnum:]-]+\\|\\(?:www\\.\\)?gitlab\\(?:\\.[[:alnum:]]+\\)+/[._[:alnum:]-]+/[._[:alnum:]-]+\\|git\\.sr\\.ht/~[._[:alnum:]-]+/[._[:alnum:]-]+\\|git\\.\\(?:s\\(?:avannah\\|v\\)\\)\\.\\(?:non\\)?gnu\\.org/\\(?:git\\|r\\)/[._[:alnum:]-]+/?\\)\\(?:/?\\|\\.git\\)\\'"
. Git)
("\\`https?://\\(?:hg\\.sr\\.ht/~[._[:alnum:]-]+/[._[:alnum:]-]+\\|hg\\.\\(?:s\\(?:avannah\\|v\\)\\)\\.\\(?:non\\)?gnu\\.org/hgweb/[._[:alnum:]-]+/?\\)\\'"
. Hg)
("\\`https?://bzr\\.\\(?:s\\(?:avannah\\|v\\)\\)\\.\\(?:non\\)?gnu\\.org/r/[._[:alnum:]-]+/?\\'"
. Bzr))
Documentation
Alist mapping repository URLs to VC backends.
vc-clone consults this alist to determine the VC
backend from the repository URL when you call it without
specifying a backend. Each element of the alist has the form
(URL-REGEXP . BACKEND). vc-clone will use BACKEND of
the first association for which the URL of the repository matches
the URL-REGEXP of the association.
This variable was added, or its default value changed, in Emacs 31.1.
Aliases
package-vc-heuristic-alist (obsolete since 31.1)
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
(defcustom vc-clone-heuristic-alist
`((,(rx bos "http" (? "s") "://"
(or (: (? "www.") "github.com"
"/" (+ (or alnum "-" "." "_"))
"/" (+ (or alnum "-" "." "_")))
(: "codeberg.org"
"/" (+ (or alnum "-" "." "_"))
"/" (+ (or alnum "-" "." "_")))
(: (? "www.") "gitlab" (+ "." (+ alnum))
"/" (+ (or alnum "-" "." "_"))
"/" (+ (or alnum "-" "." "_")))
(: "git.sr.ht"
"/~" (+ (or alnum "-" "." "_"))
"/" (+ (or alnum "-" "." "_")))
(: "git." (or "savannah" "sv") "." (? "non") "gnu.org/"
(or "r" "git") "/"
(+ (or alnum "-" "." "_")) (? "/")))
(or (? "/") ".git") eos)
. Git)
(,(rx bos "http" (? "s") "://"
(or (: "hg.sr.ht"
"/~" (+ (or alnum "-" "." "_"))
"/" (+ (or alnum "-" "." "_")))
(: "hg." (or "savannah" "sv") "." (? "non") "gnu.org/hgweb/"
(+ (or alnum "-" "." "_")) (? "/")))
eos)
. Hg)
(,(rx bos "http" (? "s") "://"
(or (: "bzr." (or "savannah" "sv") "." (? "non") "gnu.org/r/"
(+ (or alnum "-" "." "_")) (? "/")))
eos)
. Bzr))
"Alist mapping repository URLs to VC backends.
`vc-clone' consults this alist to determine the VC
backend from the repository URL when you call it without
specifying a backend. Each element of the alist has the form
\(URL-REGEXP . BACKEND). `vc-clone' will use BACKEND of
the first association for which the URL of the repository matches
the URL-REGEXP of the association."
:type `(alist :key-type (regexp :tag "Regular expression matching URLs")
:value-type ,vc-clonable-backends-custom-type)
:version "31.1")