My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2936: Commit rejected: no changes between prior commit and new commit
5 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by pawelsie...@gmail.com, Sep 29, 2014
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.
Dec 18, 2015
#1 sc68...@gmail.com
Agree - the error message is not very helpful. I had a backport patch that failed because someone beat me to uploading it to gerrit, and I had to manually go find it. The error message needs to be more descriptive.


scollins@SeanColnsMBPr15 ~/src/openstack-dev/devstack ±227374c » git review                    141 ↵
remote: Processing changes: refs: 1, done
remote: (W) No changes between prior commit 4dd556f and new commit 227374c
To ssh://scollins@review.openstack.org:29418/openstack-dev/devstack.git
 ! [remote rejected] HEAD -> refs/publish/stable/kilo/bug/1481126 (no changes made)
error: failed to push some refs to 'ssh://scollins@review.openstack.org:29418/openstack-dev/devstack.git'
Sign in to add a comment

Powered by Google Project Hosting