
lists at nadir-seen-fire
Apr 13, 2012, 2:21 PM
Post #2 of 10
(211 views)
Permalink
|
|
Re: git-review wanting to submit lot of changes
[In reply to]
|
|
On Fri, 13 Apr 2012 13:33:43 -0700, Antoine Musso <hashar+wmf [at] free> 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: > > 1) 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'. > > > 2) 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'. > > > 3) 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, > > -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] _______________________________________________ Wikitech-l mailing list Wikitech-l [at] lists https://lists.wikimedia.org/mailman/listinfo/wikitech-l
|