From: Mike Frysinger Date: Sun, 30 Nov 2008 03:22:24 +0000 (-0500) Subject: add git_gentoo_url X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c58e899dcf759ed38cd091b48d31fbe375cc6c25;p=home.git add git_gentoo_url --- diff --git a/.profile.d/gentoo.sh b/.profile.d/gentoo.sh index 179976b..e186cf9 100644 --- a/.profile.d/gentoo.sh +++ b/.profile.d/gentoo.sh @@ -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 ]] \