]> git.wh0rd.org - home.git/blobdiff - .bin/vcs-url
git-repack: new repack helper
[home.git] / .bin / vcs-url
index ccda748a14eb63023f9cb974aa9bb7f2e5790971..4090c7708c24a9f02af13960fa84f44d302940c7 100755 (executable)
@@ -60,7 +60,7 @@ cvs_url() {
 }
 
 git_url() {
-       [[ $# -ne 0 ]] && err "no args supported"
+       [[ $# -gt 1 ]] && err "accepted args: <rev>"
 
        local repo url
        local remote=$(git config remote.origin.url)
@@ -82,6 +82,10 @@ git_url() {
                repo=$(echo "${remote}" | sed -e 's,^git@github.com/,,' -e 's,^https://github.com/,,' -e 's:[.]git$::')
                url="https://github.com/${repo}/commit/"
                ;;
+       git://git.sv.gnu.org/*)
+               repo=$(echo "${remote}" | sed -e 's,^git://git.sv.gnu.org/,,' -e 's:[.]git$::')
+               url="http://git.savannah.gnu.org/cgit/${repo}.git/commit/?h="
+               ;;
        *)
                echo "Unknown remote: ${remote}"
                exit 1