Mail after commit
- From
- Claudio Scordino <cloud.of.andor@gmail.com>
- Date
- Jun 12, 2007, 15:32 UTC
- Message-ID
- <466EBC7E.8040104@gmail.com>
Hi all.
To have an email sent after every commit, I've put the following command in .git/hooks/post-commit:
rm -f /tmp/git-commit.patch ; git-format-patch --stdout -s `git log --pretty=oneline | awk '{print $1}' | sed -n '2p'` > /tmp/git-commit.patch ; git-send-email --no-signed-off-by-cc --to XXX --from YYY /tmp/git-commit.patch ; rm -f /tmp/git-commit.patch
and it works, indeed.
However, it's quite tricky.
Doesn't exist any way to make it simpler ?
Regards,
Claudio