X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=id-new-project%2Fpost-receive-email-id;h=741bbf75d8e543d26ee29172cc02a98e91c4cd2e;hb=7e7f8cb80d2b4198d411969ac1ac59410d28235b;hp=114d6132763b33e6bd03e97f7a195e7e6793d692;hpb=cb9a75f74657b43f2ea42537f4584488b658c04b;p=git-tools-moved-to-github.git diff --git a/id-new-project/post-receive-email-id b/id-new-project/post-receive-email-id index 114d613..741bbf7 100644 --- a/id-new-project/post-receive-email-id +++ b/id-new-project/post-receive-email-id @@ -371,15 +371,23 @@ generate_update_branch_email() fi fi + summary_counter=0 echo "" 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 + save_newrev=$newrev + for rev in `git log --pretty=oneline $oldrev..$newrev | perl -e 'while(<>) { push @a, (split)[0] }; print join " ", reverse @a' ` + do + newrev=$rev + echo "" + generate_gitweb_link + git rev-list --pretty -n1 $rev + git diff-tree --stat --summary --find-copies-harder $rev | tail -n +2 + summary_counter=`expr $summary_counter + 1` + done + newrev=$save_newrev # XXX: Need a way of detecting whether git rev-list actually outputted # anything, so that we can issue a "no new revisions added by this @@ -396,9 +404,11 @@ generate_update_branch_email() # is effectively a random revision at this point - the user will be # interested in what this revision changed - including the undoing of # previous revisions in the case of non-fast forward updates. - echo "" - echo "Summary of changes:" - git diff-tree --stat --summary --find-copies-harder $oldrev..$newrev + if [ $summary_counter -gt 1 ]; then + echo "" + echo "Summary of changes:" + git diff-tree --stat --summary --find-copies-harder $oldrev..$newrev + fi } # @@ -580,7 +590,7 @@ generate_gitweb_link() proj_path=`pwd` proj_dir=`basename $proj_path` gitweb_host=$GITWEB_PUB - if echo "$proj_path" | grep -q "private" + if echo "$proj_path" | egrep -q "/(private|server)" then gitweb_host=$GITWEB_PRIV fi echo "$gitweb_host/?p=$proj_dir;a=commitdiff;h=$newrev"