David Pursehouse | a68769e | 2012-11-07 12:36:17 +0900 | [diff] [blame] | 1 | missing Change-Id in commit message footer |
| 2 | ========================================== |
Edwin Kempin | c7f9e45 | 2010-12-27 09:21:45 +0100 | [diff] [blame] | 3 | |
| 4 | With this error message Gerrit rejects to push a commit to a project |
| 5 | which is configured to always require a Change-Id in the commit |
| 6 | message if the commit message of the pushed commit does not contain |
David Pursehouse | a68769e | 2012-11-07 12:36:17 +0900 | [diff] [blame] | 7 | a Change-Id in the footer (the last paragraph). |
Edwin Kempin | c7f9e45 | 2010-12-27 09:21:45 +0100 | [diff] [blame] | 8 | |
| 9 | This error may happen for two reasons: |
Edwin Kempin | ddfc41a | 2011-05-06 10:32:05 +0200 | [diff] [blame] | 10 | |
| 11 | . missing Change-Id in the commit message |
| 12 | . Change-Id is contained in the commit message but not in the last |
| 13 | paragraph |
Edwin Kempin | c7f9e45 | 2010-12-27 09:21:45 +0100 | [diff] [blame] | 14 | |
| 15 | You can see the commit messages for existing commits in the history |
| 16 | by doing a link:http://www.kernel.org/pub/software/scm/git/docs/git-log.html[git log]. |
| 17 | |
| 18 | To avoid this error you should use the link:cmd-hook-commit-msg.html[commit hook] or EGit to |
| 19 | automatically create and insert a unique Change-Id into the commit |
| 20 | message on every commit. |
| 21 | |
| 22 | |
| 23 | Missing Change-Id in the commit message |
| 24 | --------------------------------------- |
| 25 | |
| 26 | If the commit message of a commit that you want to push does not |
| 27 | contain a Change-Id you have to update its commit message and insert |
| 28 | a Change-Id. |
| 29 | |
| 30 | If you want to upload a new change to Gerrit make sure that you have |
| 31 | configured your environment so that a unique Change-Id is |
| 32 | automatically created and inserted on every commit as explained |
| 33 | above. Now you can rewrite the commits for which the Change-Ids are |
| 34 | missing and the Change-Ids will be automatically created and inserted |
| 35 | into the commit messages. This is explained link:error-push-fails-due-to-commit-message.html#commit_hook[here]. |
| 36 | |
| 37 | If you want to update an existing change in Gerrit by uploading a new |
| 38 | patch set you should copy its Change-Id from the Gerrit WebUI and |
| 39 | insert it into the commit message. How to update the commit message |
| 40 | is explained link:error-push-fails-due-to-commit-message.html[here]. |
| 41 | |
| 42 | |
| 43 | Change-Id is contained in the commit message but not in the last paragraph |
| 44 | -------------------------------------------------------------------------- |
| 45 | |
| 46 | To be picked up by Gerrit, a Change-Id must be in the last paragraph |
| 47 | of a commit message, for details, see link:user-changeid.html[Change-Id Lines]. |
| 48 | |
| 49 | If the Change-Id is contained in the commit message but not in its |
| 50 | last paragraph you have to update the commit message and move the |
| 51 | Change-ID into the last paragraph. How to update the commit message |
| 52 | is explained link:error-push-fails-due-to-commit-message.html[here]. |
| 53 | |
| 54 | |
| 55 | GERRIT |
| 56 | ------ |
| 57 | Part of link:error-messages.html[Gerrit Error Messages] |