Variable: magit-clone-url-format

magit-clone-url-format is a customizable variable defined in magit-clone.el.

Value

(("git.sr.ht" . "git@%h:%n") (t . "git@%h:%n.git"))

Documentation

Format(s) used when turning repository names into urls.

In a format string, %h is the hostname and %n is the repository name, including the name of the owner.

The value can be a string (representing a single static format) or an alist with elements (HOSTNAME . FORMAT) mapping hostnames to formats. When an alist is used, the t key represents the default. Also see magit-clone-name-alist.

This variable was added, or its default value changed, in magit version 4.0.0.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-clone.el
(defcustom magit-clone-url-format
  '(("git.sr.ht" . "git@%h:%n")
    (t . "git@%h:%n.git"))
  "Format(s) used when turning repository names into urls.

In a format string, %h is the hostname and %n is the repository
name, including the name of the owner.

The value can be a string (representing a single static format)
or an alist with elements (HOSTNAME . FORMAT) mapping hostnames
to formats.  When an alist is used, the t key represents the
default.  Also see `magit-clone-name-alist'."
  :package-version '(magit . "4.0.0")
  :group 'magit-commands
  :type '(choice (string :tag "Format")
                 (alist :key-type (choice (string :tag "Host")
                                          (const :tag "Default" t))
                        :value-type (string :tag "Format"))))