Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
2012q2
-
RC-QTQAINFRA\-544-01
Description
In some very early beginning of Gerrit someone has disabled the commit-msg hook tests when Gerrit is built on Windows since getting them to work there requires a change in JGit (for running shell script based hooks).
In May 2011 a patch for the commit-msg hook that fixes the hook for "tagged" subjects was added in the NQt Gerrit project.
No-one seemes to remember what that change was for, and there are no tests created for it. However, The change is a bit overworked, and makes all existing commit-msg tests fail if building on Linux, where the tests are not disabled.
A simple correction in gerrit-server/src/main/resources/com/google/gerrit/server/tools/root/hooks/commit-msg fixes this (changing $line>=2 to $line>=1) and should be fixed.
Probably the JGit problem should be fixed as well since the project develop and build on Windows. I have a fix for this that is tested on Linux, but it requires testing also on Windows, and then the question is if we shall override the upstream JGit version or try to get the fix added upstream in JGit and wait for it to ripple down to upstream Gerrit and then import it, which will probably ta a long time. Another option is to regularly build and test on Linux. Some digging in forums reveals that upstream Gerrit gave trying to get this fixed in upstream JGit...