[英]Git post-receive-email: Unknown type of (commit)
I'm having an issue with Git's post-receive-email hook script. 我对Git的post-receive-email钩子脚本有问题。 Here is what I did:
这是我所做的:
git --bare init myrepo.git
. git --bare init myrepo.git
初始化了裸存储库。 My server's Git config file says core.bare = true
core.bare = true
git clone URL
. git clone URL
克隆存储库。 On my client, Git config is core.bare = false
. core.bare = false
。 git push origin master
which issues the generated ref-ids for the commits done git push origin master
发出完成的提交的生成的ref-id hooks
directory with ./post-receive <oldrev> <newrev> refs/heads/master
./post-receive <oldrev> <newrev> refs/heads/master
在hooks
目录中的服务器上运行后接收钩子脚本 The following error is constantly returned: 不断返回以下错误:
Unknown type of update to c9c047af (commit)
对c9c047af的未知更新类型(落实)
no email generated没有生成电子邮件
Any clues what could be wrong? 有什么线索可能是错误的吗?
Although I used a distribution post-receive-email
script, I found a strange bug in the script. 尽管我使用了分发
post-receive-email
脚本,但在脚本中发现了一个奇怪的错误。 Towards the end of post-receive-email
in my version said: 在我的版本中,
post-receive-email
的结尾说:
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>
. post-receive <oldrev> <newrev> <refname>
的更改使我手动调用post-receive <oldrev> <newrev> <refname>
。 I hope this helps others that may face it. 我希望这对其他可能遇到的问题有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.