0

I'm working on a small application that will run as a git "commit-msg" hook. I've tested it with command-line git, and it's all working fine.

When I test it in Eclipse 2024-12 on Windows 11, it doesn't appear to use the git hook, and I have no idea why.

In Eclipse, when I view Git settings, in the "User" tab, under "core", it has a "hooksPath" property with the value C:\Users\<myuser>\.githooks.

In that directory, I have "commit-msg.exe", which is the hook application I've written. Again, this is all working fine from the command line. At a minimum, what it does is inspect the commit comment, and it will block the commit (exit with a non-zero exit code) if the commit comment doesn't have a valid JIRA ticket id within brackets in the commit comment.

From the command line, I tested with no ticket id in the comment, and it properly gives an error message and blocks the commit. In Eclipse, I made a trivial change in a file on a branch, added that file to the changes, then added a comment without a ticket number, and clicked on "Commit". It stored the commit without any error. I checked the Eclipse log, and there's nothing there related to this.

0 Answers0