SVN pre-commit hook for avoiding changes to tags subdirectories

前端 未结 11 717
陌清茗
陌清茗 2020-11-28 04:25

Is there anybody who has clear instructions on how to add a pre-commit hook that avoids changes to tags subdirectories?

I already searched the internet quite a bit.

11条回答
  •  时光说笑
    2020-11-28 05:04

    If you are using JIRA, you can use the add-on named Commit Policy to protect paths in your repository without writing custom hooks.

    How? Use the condition named Changed files must match a pattern.

    It has an regular expression type argument that must match for every file in a commit, otherwise the commit is rejected. So, in your case you should use a regex that means "does not start with the prefix /tags/".

    (You can implement many other smart checks with the same plugin.)

    Disclaimer: I'm a developer working on this paid add-on.

提交回复
热议问题