Add another case to the documentation of the missing Change-Id error
Gerrit rejects commits with 'missing Change-Id in commit message' if the Change-Id is the only line in the commit message. Explain this case in the Gerrit documentation. Change-Id: I5700f72353456d080b8e9652cd7e7d00fd1d324e Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -6,11 +6,12 @@ which is configured to always require a Change-Id in the commit
|
|||||||
message if the commit message of the pushed commit does not contain
|
message if the commit message of the pushed commit does not contain
|
||||||
a Change-Id in the footer (the last paragraph).
|
a Change-Id in the footer (the last paragraph).
|
||||||
|
|
||||||
This error may happen for two reasons:
|
This error may happen for different reasons:
|
||||||
|
|
||||||
. missing Change-Id in the commit message
|
. missing Change-Id in the commit message
|
||||||
. Change-Id is contained in the commit message but not in the last
|
. Change-Id is contained in the commit message but not in the last
|
||||||
paragraph
|
paragraph
|
||||||
|
. Change-Id is the only line in the commit message
|
||||||
|
|
||||||
You can see the commit messages for existing commits in the history
|
You can see the commit messages for existing commits in the history
|
||||||
by doing a link:http://www.kernel.org/pub/software/scm/git/docs/git-log.html[git log].
|
by doing a link:http://www.kernel.org/pub/software/scm/git/docs/git-log.html[git log].
|
||||||
@@ -51,6 +52,20 @@ last paragraph you have to update the commit message and move the
|
|||||||
Change-ID into the last paragraph. How to update the commit message
|
Change-ID into the last paragraph. How to update the commit message
|
||||||
is explained link:error-push-fails-due-to-commit-message.html[here].
|
is explained link:error-push-fails-due-to-commit-message.html[here].
|
||||||
|
|
||||||
|
Change-Id is the only line in the commit message
|
||||||
|
------------------------------------------------
|
||||||
|
|
||||||
|
Gerrit does not parse the subject of a commit message for the
|
||||||
|
Change-Id even if this is the only and last paragraph of the commit
|
||||||
|
message.
|
||||||
|
|
||||||
|
If the Change-Id is the only line in the commit message you must update
|
||||||
|
the commit message and insert a subject as the first line in the commit
|
||||||
|
message. The Change-Id must be in the last paragraph of the commit
|
||||||
|
message, i.e. separated from the subject by a blank line. How to update
|
||||||
|
the commit message is explained
|
||||||
|
link:error-push-fails-due-to-commit-message.html[here].
|
||||||
|
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
------
|
------
|
||||||
|
Reference in New Issue
Block a user