我有一个git repo,它有一个预先提交的钩子,故意100% / hooks / pre-commit >退出1
如果我尝试通过命令行提交,它按预期失败。但是,如果我从egit提交,挂钩将被忽略,并且更改将被提交。
egit / jgit是否不识别挂钩?有没有解决这个问题的方法?
在此先感谢! 解决方案
(原文答案:2011年6月)
MatrixFrog 正确点转到错误299315 ,其中提到这些挂钩不受支持还可以。
您也可以浏览JGit存储库,现在在GitHub上,不显示任何关于钩子的提交。 您可以在 EGit用户指南:钩子的概念也没有提及。
2015年3月更新(4年后):由于 MariuszS 指出在评论中,hook出现在JGit 中。
在2015年,有一些工作正在进行中,以支持这些挂钩: b $ b 这些应该在即将到来的JGit 3.7中b / b $ b 更新2015年第4季度,EGit 4.x支持挂钩,如此答案中所述。 I have a git repo with a pre-commit hook that intentionally fails 100% of the time. If I try to commit through the command line, it fails as expected. However, if I commit from egit, the hook is ignored and the changes get committed. Does egit/jgit not recognize hooks yet? Is there a workaround for this? Thanks in advance! (Original answer: June 2011) MatrixFrog correctly points out to the bug 299315, which mentions those hooks aren't supported yet. You also can explore the JGit repository, now on GitHub, which doesn't show any commit about hooks.
And you can search for 'hook' in the EGit User Guide: the notion of hook isn't mentioned either. Update March 2015 (4 years later): as MariuszS points out in the comments, "hook" is present in JGit. In 2015, there are works in progress to support those hooks: Those should be in the upcoming JGit 3.7 Update Q4 2015, EGit 4.x does support hooks, as mentioned in this answer.
更多推荐
Egit钩子不会被触发
发布评论