Git hook to detect file changes that contain a certain string

ぐ巨炮叔叔 提交于 2019-12-04 14:32:12

If you are using gitolite V3 (or 'g3'), try instead to put your check in a VREF.

For every refex starting with VREF/FOO/ in a rule that applies to this user, a call to a program called FOO is triggered (stored in $LOCAL_CODE/VREF).
Note that the program isn't even called if the VREF rule doesn't apply to that user.

You can control exactly to which (group of) users you want to apply this warning.
You can reject the push if your condition (no bad string) isn't met.

however, that still requires updating a working directory first (since Gitolite only manages bare repo by default)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!