From: Mike Frysinger Date: Sat, 17 Feb 2018 02:09:05 +0000 (-0500) Subject: vcs-url: add gitlab.com support X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a7e8a010f1faccd923e0628bdc8ed042a858e9a4;p=home.git vcs-url: add gitlab.com support --- 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="