Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Mercurial 相当于prepare-commit-messageGit 中的钩子是什么?
prepare-commit-message
基本上我正在寻找的是作为提交的一部分但在用户编辑提交消息之前运行的任何钩子。该钩子将编辑提交消息,生成的消息将显示给用户,以便对其进行验证。
据我记得,在 Mercurial 中没有等价物。还有其他几种方法可以做到这一点:
hgeditor
commit.template
我没有尝试过任何这些,所以我只能提供指针。我编写钩子的经验通常是验证即将提交的变更集或验证主存储库的传入变更集。