Issue 1908: Confusing "no changes made" error message
Status:  Released
Owner: ----
Closed:  May 2013
Reported by mdemp...@google.com, May 8, 2013
Affected Version: 2.6-rc1-394-g5348e0f

What steps will reproduce the problem?

git commit -a -m "A"
git commit -a -m "B"
git push origin HEAD:refs/for/master
git rebase --force
git commit --amend -m "B'"
git push origin HEAD:refs/for/master

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

The second git push will fail with "no changes made" because the force-rebased A commit will have a new commit ID, but the tree, commit message, and author metadata are unchanged.  However, if you don't realize that's the problem (e.g., because the rebase was run by another script), it's easy to get side tracked into wondering why Gerrit thinks the "B" and "B'" commits have no changes.

It would be much easier to track down if the "no changes made" error could be more verbose.  E.g., something like "no changes made between commit 1234 and commit 5678".
May 9, 2013
Project Member #2 david.pu...@sonymobile.com
(No comment was entered for this change.)
Status: ChangeUnderReview
May 9, 2013
Project Member #3 david.pu...@sonymobile.com
(No comment was entered for this change.)
Status: Duplicate
Mergedinto: 1902
May 9, 2013
Project Member #4 david.pu...@sonymobile.com
(No comment was entered for this change.)
Status: ChangeUnderReview
Mergedinto:
May 10, 2013
#5 sop@google.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.8
May 10, 2013
#6 mdemp...@google.com
Thanks for merging my warning! :)

Another possibility I was thinking about this morning is if Gerrit already has patches "master <- A1 <- B1", and a user tries to upload "master <- A2 <- B2" but Gerrit decides A1 == A2... would it be possible for Gerrit to just automatically rebase B2 on top of A1 so the upload still succeeds?

This would be a lot more convenient for users I think (it's actually causing us some trouble right now), though there's a small risk of confusing users that they pushed commit 1234 and it showed up as commit 5678 on the server.  That said, Gerrit already supports rebasing changes on the server-side (via an explicit Rebase button), so it's not entirely without precedent.

There could be a push warning like "(W) Rebasing commit B2 from new commit A2 onto identical prior commit A1".

Thoughts?  I can open a new feature request for this if it makes sense.
Dec 9, 2013
Project Member #7 david.pu...@sonymobile.com
(No comment was entered for this change.)
Status: Released