From 98f3af7a7cbc5a9490394c491b0117ae2e6a967b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Jul 2023 02:47:55 +0200 Subject: [PATCH] feat(vc): browse-at-remote: recognize gitlab.* hosts Previously, only gitlab.com and gitlab.gnome.org were recognized as gitlab hosts. This tweaks browse-at-remote to recognize any subdomain named gitlab.* as a gitlab host (as a fallback, if no other regexp matches). --- modules/emacs/vc/config.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/emacs/vc/config.el b/modules/emacs/vc/config.el index e151b0dc0..0fef2c56f 100644 --- a/modules/emacs/vc/config.el +++ b/modules/emacs/vc/config.el @@ -136,6 +136,10 @@ otherwise in default state." ;; Add codeberg.org support ;; TODO: PR this upstream? (add-to-list 'browse-at-remote-remote-type-regexps '(:host "^codeberg\\.org$" :type "codeberg")) + ;; Expand recognition for gitlab hosts besides gitlab.org or gitlab.gnome.org + ;; which are presumably hosted in a gitlab.* subdomain. + ;; TODO: PR this upstream? + (add-to-list 'browse-at-remote-remote-type-regexps '(:host "^gitlab\\." :type "gitlab") 'append) ;; HACK `browse-at-remote' produces urls with `nil' in them, when the repo is ;; detached. This creates broken links. I think it is more sensible to