tags:

views:

17

answers:

1

I need to send email with diff after commit to the repository. I know how to send emails after push, but it is not working for commits.

For pushes I've created hook post-receive that gets parameters . But the hook post-commit does not recieve any parameters and because of that I can't use my script that sends mail.

Maybe there is a way to get info about newrev and refname in post-commit hook, or there is some other way to send mail after commit?

A: 

The answer is simple =) I've solved my issue by creating post-commit hook with this line:

git log -1 -p|mail [email protected] -s "Git commit"
bessarabov