Re: Different behaviour of rebase -i
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 10, 2008, 11:40 UTC
- Message-ID
- <alpine.DEB.1.00.0810101319150.22125@pacific.mpi-cbg.de.mpi-cbg.de>
- In-Reply-To
- <6beb92080810091204n6df4338fs3b182194a8d6454e@mail.gmail.com>
Hi,
On Thu, 9 Oct 2008, Leonardo Sobral Cunha wrote:
Show 11 quoted lines
> While doing a git rebase with my upstream branch ahead of my local > branch, first git rewinds my local branch to point to the upstream and > then prints "Nothing to do". As expected, my local branch ends pointing > to the upstream head. > > But when I use the same command with the same branches using git rebase > -i, nothing happens and my local branch does not point to upstream (the > behaviour is different). > > Is this different behaviour of rebase -i expected or is this a bug? This > is still happening in git version 1.6.0.2.443.g52e83
This is by design. You need to have a way to stop rebasing in the editor. For example when you realize that you passed the wrong upstream or something.
The most intuitive way (I thought) is to behave the same as "git commit": if you do not want to continue, just delete everything.
Now, I can see that it is unconvenient.
A workaround would be to add a line "bla" and when rebase complains about the unknown command, continue with "git rebase --skip".
Maybe we should add a new command "noop" which is automatically inserted when there is no other command?
Ciao, Dscho