From: Jakub Skoczen Date: Thu, 8 Jan 2009 10:34:59 +0000 (+0100) Subject: Post-receive will generate gitweb links. X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=cb9a75f74657b43f2ea42537f4584488b658c04b;p=git-tools-moved-to-github.git Post-receive will generate gitweb links. --- diff --git a/id-new-project/post-receive-email-id b/id-new-project/post-receive-email-id index 6f87ac7..114d613 100644 --- a/id-new-project/post-receive-email-id +++ b/id-new-project/post-receive-email-id @@ -59,6 +59,7 @@ # - generate_delete_XXXX_email # - generate_email_footer # + generate_email() { # --- Arguments @@ -374,6 +375,8 @@ generate_update_branch_email() if [ -z "$rewind_only" ]; then echo "Revisions details." echo "" + generate_gitweb_link + echo "" echo $LOGBEGIN git rev-parse --not --branches | grep -v $(git rev-parse $refname) | git rev-list --pretty --stdin $oldrev..$newrev @@ -569,6 +572,20 @@ generate_delete_general_email() echo $LOGEND } +GITWEB_PUB="http://git.indexdata.com" +GITWEB_PRIV="https://gitid.indexdata.com" + +generate_gitweb_link() +{ + proj_path=`pwd` + proj_dir=`basename $proj_path` + gitweb_host=$GITWEB_PUB + if echo "$proj_path" | grep -q "private" + then gitweb_host=$GITWEB_PRIV + fi + echo "$gitweb_host/?p=$proj_dir;a=commitdiff;h=$newrev" +} + # ---------------------------- main() # --- Constants