Steps to replicate the issue (include links if applicable):
- When using the Gerrit patch uploader to upload and overwrite another patch, the commit message ends with a Change-Id followed by a blank line (copied and pasted from Gerrit's commit message).
Test commit This is a test commit. Change-Id: Ixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (empty line)
What happens?:
Gerrit patch uploader submitted a new patch because it did not find the Change-Id on the last line. https://gerrit.wikimedia.org/r/1104282
What should have happened instead?:
Gerrit patch uploader should either clean up the extra newline at the end or warn the user about the issue, prompting them to fix it.