]> asedeno.scripts.mit.edu Git - git.git/blobdiff - contrib/hooks/post-receive-email
Merge branch 'maint'
[git.git] / contrib / hooks / post-receive-email
index cbbd02fadd753215b3477c178b74d79a59424ee7..2aa9bb501c2768770d8aed5de93dda8afc29b427 100644 (file)
@@ -138,7 +138,15 @@ generate_email()
 
        # Check if we've got anyone to send to
        if [ -z "$recipients" ]; then
-               echo >&2 "*** hooks.recipients is not set so no email will be sent"
+               case "$refname_type" in
+                       "annotated tag")
+                               config_name="hooks.announcelist"
+                               ;;
+                       *)
+                               config_name="hooks.mailinglist"
+                               ;;
+               esac
+               echo >&2 "*** $config_name is not set so no email will be sent"
                echo >&2 "*** for $refname update $oldrev->$newrev"
                exit 0
        fi
@@ -323,7 +331,7 @@ generate_update_branch_email()
                echo "       via  $rev ($revtype)"
        done
 
-       if [ -z "$fastforward" ]; then
+       if [ "$fast_forward" ]; then
                echo "      from  $oldrev ($oldrev_type)"
        else
                #  1. Existing revisions were removed.  In this case newrev is a