(shr-tag-blockquote): Ensure paragraph start.
[gnus] / etc / post-receive
index de7e28d..421db3e 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# 2010-09-01 tzz@lifelogs.com
+# modified: 2010-09-01 and on by tzz@lifelogs.com
 
 # Use the email address of the author of the last commit.
 export USER_EMAIL=$(git log -1 --format=format:%ae HEAD)
@@ -8,8 +8,10 @@ export USER_NAME=$(git log -1 --format=format:%an HEAD)
 
 # the remainder is the standard git-core post-receive-email with some changes:
 
-# - USER_EMAIL is used in the header
-# - USER_NAME is used in the header
+# - USER_EMAIL and USER_NAME are used in the header
+# - the update message is after the diff
+# - without annotations, we use `git log --format=oneline' to generate the change summary (joining multiples with semicolons)
+# - the subject is shorter
 
 # Copyright (c) 2007 Andy Parkins
 #
@@ -181,7 +183,7 @@ generate_email()
        # that we can build from the parameters
        describe=$(git describe $rev 2>/dev/null)
        if [ -z "$describe" ]; then
-               describe=$(git log -1 --format=oneline $rev 2>/dev/null)
+               describe=$((git log --format="%s" $oldrev...$newrev | perl -e'@p = <>; chomp @p; print "=", scalar @p, "= ", join(" ; ", @p)') 2>/dev/null)
        fi
 
        if [ -z "$describe" ]; then
@@ -212,7 +214,7 @@ generate_email_header()
        cat <<-EOF
        From: ${USER_NAME} <${USER_EMAIL}>
        To: $recipients
-       Subject: ${emailprefix}$projectdesc $refname_type, $short_refname, ${change_type}d. $describe
+       Subject: $emailprefix $refname_type $short_refname ${change_type}d: $describe
        X-Git-Refname: $refname
        X-Git-Reftype: $refname_type
        X-Git-Oldrev: $oldrev
@@ -405,10 +407,6 @@ generate_update_branch_email()
 
        echo ""
        if [ -z "$rewind_only" ]; then
-               echo "Those revisions listed above that are new to this repository have"
-               echo "not appeared on any other notification email; so we list those"
-               echo "revisions in full, below."
-
                echo ""
                echo $LOGBEGIN
                show_new_revisions
@@ -418,6 +416,11 @@ generate_update_branch_email()
                # revisions added by this update" message
 
                echo $LOGEND
+
+               echo "Those revisions listed above that are new to this repository have"
+               echo "not appeared on any other notification email; so we listed those"
+               echo "revisions in full, above."
+
        else
                echo "No new revisions were added by this update."
        fi