[Bps-public-commit] git-mailer branch, splitmails, created. 62bb5beebbe870e3c851827a3fb0b97ad9568119

Kevin Falcone falcone at bestpractical.com
Wed Mar 3 13:05:57 EST 2010


The branch, splitmails has been created
        at  62bb5beebbe870e3c851827a3fb0b97ad9568119 (commit)

- Log -----------------------------------------------------------------
commit 62bb5beebbe870e3c851827a3fb0b97ad9568119
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Sep 29 19:04:21 2009 -0400

    Stupid hack to break mails up into individual messages
    
    needs sanity checking

diff --git a/post-receive-email b/post-receive-email
index c86cdfc..76929ca 100755
--- a/post-receive-email
+++ b/post-receive-email
@@ -654,10 +654,24 @@ if [ -n "$1" -a -n "$2" -a -n "$3" ]; then
 	# Output to the terminal in command line mode - if someone wanted to
 	# resend an email; they could redirect the output to sendmail
 	# themselves
-	PAGER= generate_email $2 $3 $1
+    oldrev=$2
+    newrev=$3
+    refname=$1
+    lastrev=$oldrev
+    for rev in $(git rev-list --reverse $oldrev..$newrev)
+    do
+        echo "$lastrev $rev $refname"
+        generate_email $lastrev $rev $refname
+        lastrev=$rev
+    done
 else
 	while read oldrev newrev refname
 	do
-		generate_email $oldrev $newrev $refname | send_mail
+        lastrev=$oldrev
+        for rev in $(git rev-list --reverse $oldrev..$newrev)
+        do
+            generate_email $lastrev $rev $refname | send_mail
+            lastrev=$rev
+        done
 	done
 fi

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list