On Fri, 13 Apr 2012 13:33:43 -0700, Antoine Musso hashar+wmf@free.fr wrote:
Hello,
Some people have reported that since the new version of git-review the had issue submitting patches. The symptom is:
<someone hack> <attempt to send the work by using `git-review`> Complaint:
You have more than one commit that you are about to submit. The oustanding commits are: <some changes you never did :-]>
The issue is because your last commit has been done based on a remote named 'origin' whereas git-review use the remote named 'gerrit'. Since most people update only the origin remote with git pull, the gerrit remote is lagging behind. So technically, git-review attempt to submit any commit between origin/master and gerrit/master hence the long message.
There are three ways to fix it:
- always update all remotes by using either:
- git fetch --all
- git remote update
Side effect: you have to remember to use those commands instead of 'git fetch' or 'git pull origin'.
- delete the remote named 'origin':
- git remote rm origin
Side effect: 'git pull origin' does not work anymore :-) You need to use 'git pull gerrit'.
- Tell .gitreview to use 'origin' by adding the following line:
defaultremote=origin
Make sure you have a remote named origin, if not rename the one named gerrit :D Side effect: I can not think of any.
What about the users who clone from their own GitHub fork as origin and push side-project branches there before merging and pushing finished projects to gerrit?
I use (2) aka a remote named 'gerrit'. I recommend (3) make git-review use 'origin' and I think we should modify our .gitreview file to add that line. That will avoid confusion.
cheers,