My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2924: Spurious failures due to '(no changes made)'
1 person starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  ----
Closed:  Sep 2014


Sign in to add a comment
 
Reported by szager@chromium.org, Sep 22, 2014
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version: 2.10-rc0-548-gc07d0d0

What steps will reproduce the problem?

1.

git checkout -b test1 origin/master
# Make and commit a change
git push gerrit-host HEAD:refs/for/refs/heads/master
git checkout -b test2 origin/master
git cherry-pick test1
# Make and commit a change
git push gerrit-host HEAD:refs/for/refs/heads/master

What is the expected output? What do you see instead?

Expected: the first (cherry-picked) commit gets pushed to the first review; the second commit gets pushed to a new review that depends on the first.

Actual: the second push gets rejected:

remote: (W) No changes between prior commit f3afa47 and new commit 135b87a
To gerrit-host
 ! [remote rejected] i -> refs/for/master (no changes made)
error: failed to push some refs to 'gerrit-host'


Sep 23, 2014
#1 dborowitz@google.com
This is the intended behavior. What Gerrit is telling you is you shouldn't have cherry-picked test1. 

Here is a modified version of your recipe that should work:

git checkout -b test1 origin/master
# Make and commit a change
git push gerrit-host HEAD:refs/for/refs/heads/master
git checkout -b test2 test1
# Optional: git branch -u test1
# Make and commit a change
git push gerrit-host HEAD:refs/for/refs/heads/master

Here is a recipe for recovering, assuming you have test2 from your first example checked out:

git rebase -i test1
# If you see a "pick" line referring to the cherry-picked version of test1, delete it.

I will admit the documentation (https://gerrit-review.googlesource.com/Documentation/error-no-changes-made.html) could use some more practical advice for how to avoid/recover from this situation.
Status: WontFix
Sep 23, 2014
#2 vapier@chromium.org
(No comment was entered for this change.)
Blocking: chromium:327910
Sign in to add a comment

Powered by Google Project Hosting