Merge branch 'mg/maint-tag-rfc1991' into maint
[gitweb.git] / contrib / hooks / post-receive-email
index 1a8880448ab19092fb020e20e7cdc96fe24454c0..f99ea9585014face001849aeeefa5f20e79bc1e2 100755 (executable)
@@ -144,13 +144,13 @@ prep_for_email()
                        short_refname=${refname##refs/remotes/}
                        echo >&2 "*** Push-update of tracking branch, $refname"
                        echo >&2 "***  - no email generated."
-                       exit 0
+                       return 1
                        ;;
                *)
                        # Anything else (is there anything else?)
                        echo >&2 "*** Unknown type of update to $refname ($rev_type)"
                        echo >&2 "***  - no email generated"
-                       return 0
+                       return 1
                        ;;
        esac
 
@@ -166,10 +166,10 @@ prep_for_email()
                esac
                echo >&2 "*** $config_name is not set so no email will be sent"
                echo >&2 "*** for $refname update $oldrev->$newrev"
-               return 0
+               return 1
        fi
 
-       return 1
+       return 0
 }
 
 #
@@ -228,7 +228,7 @@ generate_email_header()
        # Generate header
        cat <<-EOF
        To: $recipients
-       Subject: ${emailprefix}$projectdesc $refname_type, $short_refname, ${change_type}d. $describe
+       Subject: ${emailprefix}$projectdesc $refname_type $short_refname ${change_type}d. $describe
        X-Git-Refname: $refname
        X-Git-Reftype: $refname_type
        X-Git-Oldrev: $oldrev