My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2940: Advice for missing Change-Id should suggest 'commit --amend'
5 people starred this issue and may be notified of changes. Back to list
Status:  Released
Owner:  ----
Closed:  Nov 2014


Sign in to add a comment
 
Project Member Reported by jrn@google.com, Oct 2, 2014
Affected Version: 2.10-rc0-596-g57bb722

1. Configure project to require Change-Id
2. Push a change with missing Change-Id to refs/for/master
3. Follow the advice (to install the commit-msg hook) and push again.

Expected result: change accepted.
Actual result: "missing Change-Id in commit message footer" again

Suggested improvements:

1. Omit the 'Suggestion for commit message'. I've never seen a person use that. They seem to always prefer a command they can type.

2. Add "; commit --amend" to the Hint shown in this case.

Here's the current hint, for reference.

remote: ERROR: missing Change-Id in commit message footer        
remote: Suggestion for commit message:        
remote: Do something wonderful        
remote: 
remote: Change-Id: Iabcdfhjkgdsa...
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        
Oct 3, 2014
#1 nic...@eriksson.cc
I think this is a bad idea to remove the suggestion. If you (for whatever reason) can't install the hook it's very useful. If you run a windows machine (where the automatic install command most likely won't work) and only commit so often it's not worth the trouble finding and installing the hook manually. I know many people who simply copy paste the suggestion..

Perhaps add an advice "after installing the hook, run 'git commit --amend' to insert a Change-Id.
Oct 5, 2014
Project Member #2 david.pu...@sonymobile.com
> If you run a windows machine (where the automatic install command most likely won't work)

I haven't tried it on a Windows machine.  Do you have any specifics about what doesn't work?

Also, are you aware that you can configure the command in the config.gerrit file with the gerrit.installCommitMsgHookCommand parameter?

Nov 7, 2014
#3 sop@google.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.11
Apr 16, 2015
Project Member #4 david.pu...@sonymobile.com
(No comment was entered for this change.)
Status: Released
Sign in to add a comment

Powered by Google Project Hosting