Reputation: 10039
I'm having an issue with Git's post-receive-email hook script. Here is what I did:
git --bare init myrepo.git
. My server's Git config file says core.bare = true
git clone URL
. On my client, Git config is core.bare = false
.git push origin master
which issues the generated ref-ids for the commits donehooks
directory with ./post-receive <oldrev> <newrev> refs/heads/master
The following error is constantly returned:
Unknown type of update to c9c047af (commit)
no email generated
Any clues what could be wrong?
Upvotes: 2
Views: 577
Reputation: 10039
Although I used a distribution post-receive-email
script, I found a strange bug in the script. Towards the end of post-receive-email
in my version said:
prep_for_email $2 $3 $1 && PAGER= generate_email
which should be
prep_for_email $1 $2 $3 && PAGER= generate_email
The change resolved my manual call to post-receive <oldrev> <newrev> <refname>
. I hope this helps others that may face it.
Upvotes: 1