Skip to content

Commit 5d07efd

Browse files
committed
Update the docs to mention how to link to an http host
1 parent f12dbcc commit 5d07efd

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,12 @@ For example, to link files from the remote `ssh.gitlab.company.com` to the web h
224224
(eval-after-load 'git-link
225225
'(progn
226226
(add-to-list 'git-link-web-host-alist
227-
'("ssh\\.gitlab\\.compamy\\.com" "gitlab.compamy.com"))))
227+
'("ssh\\.gitlab\\.compamy\\.com" "gitlab.compamy.com")
228+
'("something\\.local" "http://git.localhost.com"))))
228229
```
229230

231+
If `WEB-HOST` does not have a scheme it defaults to `"https://"`.
232+
230233
### See Also
231234

232235
* [copy-as-format](https://github.com/sshaw/copy-as-format)

git-link.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,10 @@ This can be used when custom deployments serve SSH access and the
325325
web interface under different host names. For example, if Git
326326
uses \"ssh.gitlab.company.com\" but the web interface is at
327327
\"gitlab.company.com\", add
328-
`(\"ssh\\\\.gitlab\\\\.company\\\\.com\" . \"gitlab.company.com\")'."
328+
`(\"ssh\\\\.gitlab\\\\.company\\\\.com\" . \"gitlab.company.com\")'.
329+
By default this will create a link using the \\='https://\\=' scheme.
330+
If you want \\='http://\\=' instead prefix the host with it:
331+
`(\"ssh\\\\.gitlab\\\\.company\\\\.com\" . \"http://gitlab.company.com\")'."
329332
:type '(alist :key-type string :value-type string)
330333
:group 'git-link)
331334

0 commit comments

Comments
 (0)