]> git.droids-corp.org - git-central.git/commit
Our changes to the email script.
authorStephen Haberman <stephen@exigencecorp.com>
Thu, 19 Jun 2008 18:07:23 +0000 (13:07 -0500)
committerStephen Haberman <stephen@exigencecorp.com>
Thu, 19 Jun 2008 22:27:23 +0000 (17:27 -0500)
commit9f8abe6c0f4cc57a7e9dd76eba235b70252b553c
treec559cdfc531a6a1633d1d7cb3ed0a7b8eac8b635
parent96d67e4b8cc41de9dea4120a5d4b6357358c7d23
Our changes to the email script.

- Branch create: reverse order of new log messages
- Branch create: add summary of changes with patch output
- Branch update: reverse order of new log messages
- Branch update: include patch output in summary of changes
- Use msmtp instead of sendmail

index 4136895..9fa133b 100644
--- a/server/post-receive-email
+++ b/server/post-receive-email
@@ -230,8 +230,12 @@ generate_create_branch_email()
  # (see generate_update_branch_email for the explanation of this
  # command)
  git rev-parse --not --branches | grep -v $(git rev-parse $refname) |
- git rev-list --pretty --stdin $newrev
+ git rev-list --pretty --reverse --stdin $newrev
  echo $LOGEND
+
+ echo ""
+ echo "Summary of changes:"
+ git diff-tree --stat -p $newrev
 }

 #
@@ -391,7 +395,7 @@ generate_update_branch_email()
  echo ""
  echo $LOGBEGIN
  git rev-parse --not --branches | grep -v $(git rev-parse $refname) |
- git rev-list --pretty --stdin $oldrev..$newrev
+ git rev-list --reverse --pretty --stdin $oldrev..$newrev

  # XXX: Need a way of detecting whether git rev-list actually
  # outputted anything, so that we can issue a "no new
@@ -411,7 +415,7 @@ generate_update_branch_email()
  # non-fast forward updates.
  echo ""
  echo "Summary of changes:"
- git diff-tree --stat --summary --find-copies-harder $oldrev..$newrev
+ git diff-tree --stat -p --find-copies-harder $oldrev..$newrev
 }

 #
@@ -596,7 +600,8 @@ send_mail()
  if [ -n "$envelopesender" ]; then
  /usr/sbin/sendmail -t -f "$envelopesender"
  else
- /usr/sbin/sendmail -t
+ # /usr/sbin/sendmail -t
+ /home/BIPFS/shaberman/local/bin/msmtp --file=/srv/git/hooks/msmtp.conf -t
  fi
 }
post-receive-email [deleted file]
server/post-receive-email