Ben Ben - 5 months ago 49
Git Question

Change ID not found when Change ID is in the correct location

I am trying to push in gerrit with the following commit message:

Changed some of the packing code for the PLC protocol packet handler.

Change-Id: Ib1e939c444d0c6750955bcd5414ce1cb6f95093a

I get the following error from git/gerrit:

remote: ERROR: missing Change-Id in commit message footer

remote: Hint: A potential Change-Id was found, but it was not in the footer (last paragraph) of the commit message.

So the change ID is in the last paragraph (unless there are some funny charactes that i cannot select underneath it). Why am i not able to push this?

Note: I can easily work around this, if I switch to another branch and cherry pick this exact commit, i can push correctly. This leads me to believe there is something wrong with the branch??


Probably you're pushing more than one commit to Gerrit at the same time. Remember that ALL new commits in your branch will be pushed to Gerrit. Execute a "git log" command and check how many of the last commits are new and if they all have Change-Id in the commit message.

What Gerrit version are you using? The Gerrit 2.13 has improved the error message to prevent this kind of issue. See the "Issue 4488" solution at here.