Files
gerrit/Documentation/error-messages.txt
Jonathan Nieder 1063e30c58 Reject changes with Change-Id above footer
Documentation/user-change-id.txt explains:

	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 Signed-off-by, Acked-by, or other such lines.

It is easy to forget to do that, producing a commit message like

	Do something great

	Change-Id: I55ca6286e3e4f4fba5d0448333fa99fc5a404a73

	Bug: 12345

Because of the blank line between the Change-Id and other trailer
line, the Change-Id is not picked up by Gerrit.  Worse, if the
repository is configured with "Require Change-Id in commit message"
set to false, then Gerrit comes up with its own change-id for the
change.  If I amend my commit in response to review comments and push
for review again, Gerrit comes up with another change-id, so my
amended version of the change shows up as a new change.

This sequence of events can be avoided by setting "Require Change-Id"
to true, but some projects like to review changes from upstreams that
don't use Gerrit.  Fortunately, even these projects don't need changes
with a Change-Id before the footer.  Treat them as an error
unconditionally, with the same advice to the user about how to clean up
that is already shown in Require Change-Id mode:

	ERROR: Change-Id must be in message footer

	Hint: run
	  git commit --amend
	and move 'Change-Id: Ixxx..' to the bottom on a separate line

As a side benefit, treating this as its own error type also allows
simplifying the error reporting for changes with no Change-Id.

Reported-by: Paul Crowley <paulcrowley@google.com>
Change-Id: Ia5d43370e075d6fc13cd9b22031436f1138e90c0
2019-04-02 22:51:38 -07:00

53 lines
2.5 KiB
Plaintext

= Gerrit Code Review - Error Messages
This page provides access to detailed explanations of Gerrit error
messages. For each error message it is explained why the error is
occurring and what can be done to solve it.
== Error Messages
* link:error-branch-not-found.html[branch ... not found]
* link:error-change-closed.html[change ... closed]
* link:error-change-does-not-belong-to-project.html[change ... does not belong to project ...]
* link:error-change-not-found.html[change ... not found]
* link:error-commit-already-exists.html[commit already exists]
* link:error-contains-banned-commit.html[contains banned commit ...]
* link:error-has-duplicates.html[... has duplicates]
* link:error-invalid-author.html[invalid author]
* link:error-invalid-changeid-line.html[invalid Change-Id line format in commit message footer]
* link:error-invalid-committer.html[invalid committer]
* link:error-missing-changeid.html[missing Change-Id in commit message footer]
* link:error-changeid-above-footer.html[Change-Id must be in commit message footer]
* link:error-missing-subject.html[missing subject; Change-Id must be in commit message footer]
* link:error-multiple-changeid-lines.html[multiple Change-Id lines in commit message footer]
* link:error-no-common-ancestry.html[no common ancestry]
* link:error-no-new-changes.html[no new changes]
* link:error-non-fast-forward.html[non-fast forward]
* link:error-not-a-gerrit-administrator.html[Not a Gerrit administrator]
* link:error-not-permitted-to-create.html[Not permitted to create ...]
* link:error-not-signed-off-by.html[not Signed-off-by author/committer/uploader in commit message footer]
* link:error-not-valid-ref.html[not valid ref]
* link:error-change-upload-blocked.html[One or more refs/for/ names blocks change upload]
* link:error-permission-denied.html[Permission denied (publickey)]
* link:error-prohibited-by-gerrit.html[prohibited by Gerrit]
* link:error-project-not-found.html[Project not found: ...]
* link:error-same-change-id-in-multiple-changes.html[same Change-Id in multiple changes]
* link:error-too-many-commits.html[too many commits]
* link:error-upload-denied.html[Upload denied for project \'...']
* link:error-push-refschanges-not-allowed.html[upload to refs/changes not allowed]
* link:error-not-allowed-to-upload-merges.html[you are not allowed to upload merges]
== General Hints
* link:error-push-fails-due-to-commit-message.html[push fails due to commit message]
GERRIT
------
Part of link:index.html[Gerrit Code Review]
SEARCHBOX
---------