]> git.wh0rd.org Git - home.git/commitdiff
add git_gentoo_url
authorMike Frysinger <vapier@gentoo.org>
Sun, 30 Nov 2008 03:22:24 +0000 (22:22 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 Apr 2012 19:36:06 +0000 (15:36 -0400)
.profile.d/gentoo.sh

index 179976b33aa8fe0f323beefc947dfc93f0125558..e186cf9a96315ef49d9ad635e4edcab5575abe6d 100644 (file)
@@ -58,7 +58,11 @@ _cvs_gentoo_url() {
        done
        unset _cvs_gentoo_url
 }
-
+git_gentoo_url() {
+       local repo=$(git config remote.origin.url | sed 's:.*git.overlays.gentoo.org/::')
+       git log -n3 ${1:-HEAD} | \
+               sed "s,^commit ,http://git.overlays.gentoo.org/gitweb/?p=${repo};a=commitdiff;h=,"
+}
 
 er() {
        [[ ! -e ChangeLog ]] \