In gitolite, how to reject pushes containing incorrect author info

后端 未结 1 549
谎友^
谎友^ 2020-12-10 21:35

I intend to only accept the commits containning correct author information. like Author: Name

in gitolite, is there a way to implem

相关标签:
1条回答
  • 2020-12-10 22:24

    First, with Gitolite V3, it is called VREF, similar to an EMAIL_CHECK VREF.

    You can also use in g2 (Gitolite V2) "virtual ref" (precursors of g3 VREF), including the check author email one: the script is "g2/contrib/VREF/gl-VREF-EMAIL_CHECK".
    You would need to adapt that script to your own email control policy.

    For a hook running for all repos on all users, a simpler version would be an update hook, but since that version uses the update hook already, you will need to chain your own update hook.
    See "hook chaining".

    To run your own 'update' hook, just put it in a file called update.secondary and install it as a hook.
    Gitolite's update hook will automatically chain to it, taking care to pass it the same 3 arguments the original update hook received from git.

    0 讨论(0)
提交回复
热议问题