Affected version: Gerrit 2.9
A commit for which only commit date has been change is rejected because of "no changes".
Looking at the code (ReceiveCommits.java) it looks like currently any of the following must be modified for the commit to be accepted:
- base tree
- message
- parent commits
- author
If there are only some other changes, the commit is rejected.
This behaviour might be confusing, especially for less experienced users. It's very easy to accidentally run into the issue.
Scenario:
1. Do a local rebase (git pull --rebase)
2. Someone clicks "Rebase change" on Gerrit (which results in the same base tree, but different date and/or commiter name)
3. Try to push to Gerrit
Result:
The commit is rejected (following commits, if there are any, are therefore rejected as well, although this happens silently).
Expected result:
The commit should not be rejected. Instead, a warning that only commit date and/or commiter name was changed should be displayed.
Alternatively, if rejecting the commit, the error message should be changed to something less confusing. The current error message is "no changes made" even if there are some more commits which are not yet on Gerrit and which are expected by the user to be pushed.