Clearer error message when Change-Id line not found

Improve the error message that is reported when a Change-Id
line is found in the commit message, but not in the footer.

Now the error message makes it clearer that the Change-Id is
expected to be found in last paragraph.

Also updated the documentation with the same clarification,
and added a cross-reference link to the Signed-Off-By page.

Change-Id: I0a8329edb89aea32f02ba285d292652bf6c0ee55
This commit is contained in:
David Pursehouse
2013-04-16 18:14:29 +09:00
parent 6a4b4d27e3
commit 871670b3dc
2 changed files with 6 additions and 5 deletions

View File

@@ -10,10 +10,10 @@ drafts of it. By including a unique Change-Id in the commit message,
Gerrit can automatically associate a new version of a change back
to its original review, even across cherry-picks and rebases.
To be picked up by Gerrit, a Change-Id line must be in the bottom
portion (last paragraph) of a commit message, and may be mixed
together with the Signed-off-by, Acked-by, or other such footers.
For example:
To be picked up by Gerrit, a Change-Id line must be in the footer
(last paragraph) of a commit message, and may be mixed
together with link:user-signedoffby.html[Signed-off-by], Acked-by,
or other such lines. For example:
----
$ git log -1

View File

@@ -486,7 +486,8 @@ public class CommitValidators {
sb.append('\n');
sb.append(changeId).append(" I").append(c.name());
sb.append('\n');
sb.append("Hint: A potential Change-Id was found, but it was not in the footer of the commit message.");
sb.append("Hint: A potential Change-Id was found, but it was not in the ");
sb.append("footer (last paragraph) of the commit message.");
}
}
sb.append('\n');