From a7e8a010f1faccd923e0628bdc8ed042a858e9a4 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 16 Feb 2018 21:09:05 -0500 Subject: [PATCH] vcs-url: add gitlab.com support --- .bin/vcs-url | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.bin/vcs-url b/.bin/vcs-url index 3c1aa8c..bba45e2 100755 --- a/.bin/vcs-url +++ b/.bin/vcs-url @@ -88,6 +88,11 @@ git_url() { repo=$(echo "${remote}" | sed -e 's,^git@github.com[:/],,' -e 's,^https://github.com/,,' -e 's,^git://github.com/,,' -e 's:[.]git$::') url="https://github.com/${repo}/commit/" ;; + git@gitlab.com[:/]*|\ + *://gitlab.com/*) + repo=$(echo "${remote}" | sed -e 's,^git@gitlab.com[:/],,' -e 's,^https://gitlab.com/,,' -e 's,^git://gitlab.com/,,' -e 's:[.]git$::') + url="https://gitlab.com/${repo}/commit/" + ;; git://git.sv.gnu.org/*|git://git.savannah.gnu.org/*) repo=$(echo "${remote}" | sed -r -e 's,^git://git.(sv|savannah).gnu.org/,,' -e 's:[.]git$::') url="http://git.savannah.gnu.org/cgit/${repo}.git/commit/?h=" -- 2.39.2