| Issue 1920: | Git push of depended commit rejected with message "no changes made" | |
| 33 people starred this issue and may be notified of changes. | Back to list |
Affected Version:2.5.3 What steps will reproduce the problem? 1. Make a change #1. Commit the change and push the change for review. The change and its patchset 1 appears in Gerrit Web GUI. 2. On the same local branch make change #2 (the change #2 is dependent on change #1) 3. Now try to push the change #2 for review too (via git push) Result: Nothing is pushed. The push is rejected by Gerrit with message [remote rejected] master -> refs/for/master (no changes made) I assume the error is shown because since change #1 was not merged yet, git push command tries to push the both changes. But the first one really has not changed, hence the error. What is the expected output? What do you see instead? I thing the better way of handling this situation in step 3 would be like this: - since the commit #1 has not changed since last push, instead of error message the push of this commit would be ignored. No new patchset will be created. - push of commit #2 should still succeed - "no changes made" error should be visible only if none of the commits pushed in the chain contain no new change. Please provide any additional information below.
Oct 31, 2013
#1
aertm...@gmail.com
Feb 20, 2014
Are you pushing to refs/changes or refs/for?
Feb 20, 2014
I'm pushing to refs/for
Feb 22, 2014
Same here.. "git config remote.origin.push HEAD:refs/for/master"
Feb 22, 2014
This week it happened again. This time on gerrit version 2.7
Apr 24, 2014
Problem i am getting on branch merge. I am trying to merge master into other branch but is saying ' ! [remote rejected] HEAD -> refs/for/gs_phase2_lo (no new changes)'
Apr 25, 2014
I've noticed that this problem occurs when cherry-picking multiple change sets on a branch that's tracked against a remote. In this case it's ahead with x number of changes and when pushing it pushes all the changes to Gerrit and in case one of them hasn't changed it throws the error. It seems like it handles the dependent commit independently and doesn't check if it's pushed because it's a dependency. A couple of workarounds: 1. Use checkout instead of cherry-pick so it's headless and therefore doesn't know how far behind/ahead it is. 2. Update the commit message of the dependent change in Gerrit and push, then the commit message will be reset and it won't complain about the no changes made.
May 20, 2014
I also faced same problem.
Jul 11, 2015
I have the same issue when merge having no conflicts. If having conflicts, it will be fine, since there is a conflict resolving commit, which is the "new changes". The issue is gerrit seems having trouble to recognize the "new changes" when merging without conflicts, and it's pure head movement.
Jan 3, 2016
This isn't "Minor" and has been open for years. Can someone please look at this? |
|
| ► Sign in to add a comment |