From 3788da68a5d3d5cd73476b974ab1bdba2d6b5c35 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Thu, 5 Nov 2009 01:31:38 +0100 Subject: [PATCH] taskd/mail.sh: Default showrev includes gitweb link. --- taskd/mail.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/taskd/mail.sh b/taskd/mail.sh index 8a00ec2..b045636 100755 --- a/taskd/mail.sh +++ b/taskd/mail.sh @@ -17,6 +17,7 @@ # * Load shlib. # * Default subject prefix is site name. # * Unsubscribe instructions in email footer. +# * Default showrev includes gitweb link. # ================= # # This hook is stored in the contrib/hooks directory. Your distribution @@ -638,16 +639,23 @@ show_new_revisions() other_branches=$(git for-each-ref --format='%(refname)' refs/heads/ | grep -F -v $refname) git rev-parse --not $other_branches | - if [ -z "$custom_showrev" ] - then - git rev-list --pretty --stdin $revspec - else +# if [ -z "$custom_showrev" ] +# then +# git rev-list --pretty --stdin $revspec +# else git rev-list --stdin $revspec | while read onerev do - eval $(printf "$custom_showrev" $onerev) + if [ -n "$custom_showrev" ]; then + eval $(printf "$custom_showrev" $onerev) + else + echo "$cfg_gitweburl/$projectname/commit/$onerev" + echo + git rev-list -1 --pretty $onerev + echo + fi done - fi +# fi } -- 2.11.4.GIT