Community
Participate
Working Groups
When a repository is cloned with JGit (EGit) there is no 'hooks' folder under the repository's '.git' folder. Since hooks are not supported yet (?) this is not an issue, but it gets annoying if you use this repository also from the normal Git command line (e.g. msysgit) and you want to install the commit hook from Gerrit to automatically generate Change-ID's. The Gerrit documentation [1] provides the following command to install the commit hook: scp -p -P 29418 review.example.com:hooks/commit-msg .git/hooks/ e.g.: scp -p -P 29418 edwin.kempin@review.source.android.com:hooks/commit-msg .git/hooks/ This command copies the 'commit-msg' file from Gerrit into the '.git/hooks/' folder. However if the '.git/hooks/' folder does not exist, the command instead creates a file '.git/hooks' which has the content of the 'commit-msg' file. Then the hook is of course not working. I guess the easiest way to avoid this problem would be to simply create an empty '.git/hooks' folder on clone. [1] https://review.source.android.com/Documentation/user-changeid.html#creation
This sounds reasonable.
Fixed in http://egit.eclipse.org/r/2566