|Issue 4488||Improve error message when Change-Id missing|
|Starred by 2 users||Reported by matt...@unsolvable.org, Sep 2||Back to list|
When you push to Gerrit, Gerrit checks that all new commits have a Change-Id. If any new commit is missing the Change-Id, the push is rejected with an error message that include the following text: "missing Change-Id in commit message footer Processing changes: refs: 1 Processing changes: refs: 1, done ERROR: missing Change-Id in commit message footer" What happens then is that the developer looks at the change they just attempted to push, verifies that the Change-Id is there, and goes "what??". I get called, and it turns out that an EARLIER change was missing the Change-Id. Can I suggest that the reject message be changed to say: ERROR: missing Change-Id in commit message footer for commit <SHA1>. That makes it explicit which commit message Gerrit is unhappy with, and for developers who are not experts in Gerrit, it draws their attention to that fact that the problem commit message might not be for the top commit. I haven't looked at the code, but instinct tells me this should be a straightforward change.
https://gerrit.googlesource.com/gerrit/+/master/gerrit-server/src/main/java/com/google/gerrit/server/git/validators/CommitValidators.java is the file to change, if you want to take a stab at it.
This was already done  and will be in version 2.13.  https://gerrit-review.googlesource.com/#/c/75914/
Great! I missed that.
|► Sign in to add a comment|