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