]> git.wh0rd.org - home.git/commitdiff
vcs-url: add support for rpc://
authorMike Frysinger <vapier@gentoo.org>
Wed, 29 Nov 2023 21:53:36 +0000 (16:53 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 30 Nov 2023 20:30:31 +0000 (15:30 -0500)
.bin/vcs-url

index e729485ff14e5ee57623b6163601c7adead2b42a..8eaff274e119ced2dbbda9c0822b76fe4e91d1d4 100755 (executable)
@@ -129,6 +129,10 @@ git_url() {
                repo=$(echo "${remote}" | sed -e 's,.*/,,' -e 's,[.]git$,,')
                url="https://gcc.gnu.org/git/?p=${repo}.git;a=commit;h="
                ;;
+       rpc://*)
+               url="${remote#rpc://}"
+               url="https://${url/\//.googlesource.com/}/+/"
+               ;;
        *.googlesource.com/*)
                url="${remote%.git}/+/"
                ;;