]> git.wh0rd.org - home.git/commitdiff
vcs-url: improve savannah URIs
authorMike Frysinger <vapier@gentoo.org>
Thu, 7 Dec 2023 17:51:01 +0000 (10:51 -0700)
committerMike Frysinger <vapier@gentoo.org>
Thu, 7 Dec 2023 17:51:01 +0000 (10:51 -0700)
.bin/vcs-url

index 8eaff274e119ced2dbbda9c0822b76fe4e91d1d4..99c00d9a19ce622b1cf1015c236529c60ec626ec 100755 (executable)
@@ -109,13 +109,13 @@ git_url() {
                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="
+       git://git.sv.gnu.org/*|git://git.savannah.gnu.org/*|https://git.savannah.gnu.org/*)
+               repo=$(echo "${remote}" | sed -E -e 's,^(git|https)://git.(sv|savannah).gnu.org/(git/)?,,' -e 's:[.]git$::')
+               url="https://git.savannah.gnu.org/cgit/${repo}.git/commit/?h="
                ;;
        git://git.sv.nongnu.org/*|git://git.savannah.nongnu.org/*)
                repo=$(echo "${remote}" | sed -r -e 's,^git://git.(sv|savannah).nongnu.org/,,' -e 's:[.]git$::')
-               url="http://git.savannah.nongnu.org/cgit/${repo}.git/commit/?h="
+               url="https://git.savannah.nongnu.org/cgit/${repo}.git/commit/?h="
                ;;
        git://git.code.sf.net/p/*|ssh://*@git.code.sf.net/p/*)
                repo=$(echo "${remote}" | sed -r -e 's,(git://|ssh://([^@]*@)?)git.code.sf.net/p/([^/]*)/.*,\3,')