Le mardi 12 octobre 2010, Marek Wywiał a écrit :
> > I'm using the post-receive hook to send notification upon pushes on
> > a central repository. I'd like to set the sender address (in the
> > 'From' header) according to the respective "author" of the push, is
> > is possible?
> I think answer is here:
> so, you can use:
> * export USER_EMAIL=$(git log -1 --format=format:%ae HEAD)
> in your post-receive hook
Thanks for this information. Unfortunately, the 'USER_EMAIL'
environment variable does not seem to be used by the standard
post-receive hooks (i.e. the one that is shipped with git in contrib).
I've found a workaround that consists of re-setting the
hooks.envelopesender option upon each push. For me, the following
post-receive works fine:
git config hooks.envelopesender $(git log -1 --pretty=format:%ae
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at