mail.sh: apply more recent updates from contrib/hooks/post-receive-email
commit39c2cd3c7c3df80a9d7c1850e4fd4e53fb5fc2b1
authorKyle J. McKay <mackyle@gmail.com>
Fri, 17 Jan 2014 11:57:34 +0000 (17 03:57 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Fri, 17 Jan 2014 11:57:34 +0000 (17 03:57 -0800)
treec23e2555d9a93330dd1665628ad7485bf96c01e5
parentb33c25a4a295893c78b3f28aa52036b449c8cd6f
mail.sh: apply more recent updates from contrib/hooks/post-receive-email

Since mail.sh moved into Girocco, it stopped automatically picking up
the contrib/hooks/post-receive-email updates.

Apply the ones that are most applicable and do not conflict with any
of the Girocco-specific changes.  These are:

* Add mime headers and make sure the body is UTF-8
* Use plumbing commands instead of porcelain to decrease fragility
* Add Auto-Submitted header (RFC3834) to help quell vacation auto responders
* Match up $LOGBEGIN..$LOGEND pairs correctly
* Fix some spelling errors and comments
* Update the logic that avoids sending empty emails
* In stdin mode allow subsequent emails to be sent even if earlier ones fail

There should be no change in content of the sent emails (other than making
sure they're now encoded in UTF-8).
taskd/mail.sh