]> git.wh0rd.org - home.git/commitdiff
vcs-url: more updates
authorMike Frysinger <vapier@gentoo.org>
Wed, 9 Mar 2016 17:39:55 +0000 (12:39 -0500)
committerMike Frysinger <vapier@gentoo.org>
Wed, 9 Mar 2016 17:39:55 +0000 (12:39 -0500)
.bin/vcs-url

index 0d83a33bc772ad640fcbd72db576eccff1a1c63c..a86f8b7330bc9cab0fac9398072312e49531ec9b 100755 (executable)
@@ -85,7 +85,7 @@ git_url() {
                ;;
        git@github.com/*|\
        *://github.com/*)
-               repo=$(echo "${remote}" | sed -e 's,^git@github.com/,,' -e 's,^https://github.com/,,' -e 's:[.]git$::')
+               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://git.sv.gnu.org/*)
@@ -96,6 +96,13 @@ git_url() {
                repo=$(echo "${remote}" | sed -r -e 's,git://git.code.sf.net/p/([^/]*)/.*,\1,')
                url="http://sourceforge.net/p/${repo}/code/ci/"
                ;;
+       *://sourceware.org/*)
+               repo=$(echo "${remote}" | sed -e 's,.*/,,' -e 's,[.]git$,,')
+               url="https://sourceware.org/git/?p=${repo}.git;a=commit;h="
+               ;;
+       *.googlesource.com/*)
+               url="${remote%.git}/+/"
+               ;;
        *)
                echo "Unknown remote: ${remote}"
                exit 1