Note that the remote can be named anything but its URL's host must match what's in the associated link function's alist.
This defaults to "sourcegraph" but can be changed. See Building Links and Adding Services.
URLs with ports or an http scheme will not work. It's a trivial fix so if it's a problem for you please open an issue.
Building Links and Adding Services
git-link-remote-alist is an alist containing (REGEXP FUNCTION)
elements. The FUNCTION creates URLs for file on remote host names that
match the REGEXP. To add (or modify) how URLs are created for a given
host, add appropriate elements to this list.
As an example, one of the default elements in this alist is
("gitlab" git-link-gitlab). So the git-link-gitlab function
will be used to create URLs to files in remotes that match the
regexp"gitlab". That would cover common Gitlab host URLs like
"gitlab.com", "gitlab.example.com" and "gitlab.example.org".
git-link-commit-remote-alist is also an alist containing (REGEXP FUNCTION) elements. Here, the FUNCTION creates URLs to the commit
pages, for remote hosts matching REGEXP.
If you use a self-hosted version of one of the supported services, but
your remote URL does match with the defaults, you can configure these
link function alists. For example, for a GitHub Enterprise instance
at gh.example.com, you could add the following to your .emacs
file:
请发表评论