Egit hooks do not get triggered

后端 未结 2 1532
北恋
北恋 2020-12-01 23:24

I have a git repo with a pre-commit hook that intentionally fails 100% of the time.

cat .git/hooks/pre-commit
> exit 1

If I try to commi

相关标签:
2条回答
  • 2020-12-02 00:10

    My workaround:

    run: git commit -a ...

    from the command line in your working directory if you can, the hook gets executed and all other eGit functionality will work as normal.

    0 讨论(0)
  • 2020-12-02 00:21

    (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:

    • "Introduce hook support into the FS implementations"
    • "Support for the pre-commit hook" (so not yet pre-receive hook)

    Those should be in the upcoming JGit 3.7


    Update Q4 2015, EGit 4.x does support hooks, as mentioned in this answer.

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