Change-Id commit hook and EGit

312 views
Skip to first unread message

Michael Prentice

unread,
Jun 14, 2014, 10:56:03 AM6/14/14
to google-web-tool...@googlegroups.com
Is there something special that I need to do to get EGit to work properly with the Change-Id commit hook?

:~/Git/gwt/trunk$ git push origin HEAD:refs/for/masterCounting objects: 59, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1.24 KiB | 0 bytes/s, done.
Total 11 (delta 10), reused 0 (delta 0)
remote: Resolving deltas: 100% (10/10)
remote: Processing changes: refs: 1, done    
remote: ERROR: missing Change-Id in commit message footer
remote: Suggestion for commit message:
remote: Fix errors in Eclipse and ANT builds related to super source dir in
remote: test.
remote: Discussion and details here:
remote: Change-Id: I73daa934dfbce1a4eca486153992dc1652450b58
remote: 
remote: Hint: To automatically insert Change-Id, install the hook:
remote: curl -Lo `git rev-parse --git-dir`/hooks/commit-msg https://gerrit-review.googlesource.com/tools/hooks/commit-msg ; chmod +x `git rev-parse --git-dir`/hooks/commit-msg
remote: 
remote: 
 ! [remote rejected] HEAD -> refs/for/master (missing Change-Id in commit message footer)
error: failed to push some refs to 'https://gwt.googlesource.com/gwt'


I've run 'curl -Lo `git rev-parse --git-dir`/hooks/commit-msg https://gerrit-review.googlesource.com/tools/hooks/commit-msg ; chmod +x `git rev-parse --git-dir`/hooks/commit-msg' multiple times and verified that the commit_msg file is in my checkout's .git/hooks directory:

:~/Git/gwt/trunk/.git/hooks$ ls -l
total 44
-rw------- 1 splaktar splaktar  452 Apr  9 17:22 applypatch-msg.sample
-rwxrwxrwx 1 splaktar splaktar 4376 Jun 14 10:52 commit-msg

But when committing from Eclipse, I never get the Change-Id correctly added.

Jens

unread,
Jun 14, 2014, 12:59:51 PM6/14/14
to google-web-tool...@googlegroups.com
EGit does not support commit hooks yet. 

If you are on Mac I recommend sourcetreeapp.com to do your daily git work.

-- J.

Michael Prentice

unread,
Jun 14, 2014, 2:28:21 PM6/14/14
to google-web-tool...@googlegroups.com
Good to know. Thanks. This was driving me nuts.

I'm on Ubuntu, so unfortunately Sourcetree is not an option. I've used it before though and it is quite nice.

Thomas Broyer

unread,
Jun 14, 2014, 5:21:11 PM6/14/14
to google-web-tool...@googlegroups.com


On Saturday, June 14, 2014 8:28:21 PM UTC+2, Michael Prentice wrote:
Good to know. Thanks. This was driving me nuts.

I'm on Ubuntu, so unfortunately Sourcetree is not an option. I've used it before though and it is quite nice.

"git citool" and gitk are my daily tools ;-)
Reply all
Reply to author
Forward
0 new messages