Re: [BUG] - git rebase -i performs rebase when it shouldn't?
- From
Jeff King <peff@peff.net>
- Date
- Apr 12, 2010, 01:01 UTC
- Message-ID
- <20100412010123.GA11051@coredump.intra.peff.net>
- In-Reply-To
- <201004111954.38156.j6t@kdbg.org>
On Sun, Apr 11, 2010 at 07:54:37PM +0200, Johannes Sixt wrote:
Show 10 quoted lines
> On Sonntag, 11. April 2010, Jeff King wrote: > > Good point. Originally, we did the rebase directly on the branch, though > > I'm not sure if we did "checkout $branch && reset $onto" or "branch -f > > $branch $onto && checkout $branch". These days we operate on a detached > > HEAD, and we seem to "checkout $onto^0", which should do the > > optimization you mention. > > But before this "checkout $onto^0" happens, some (all?) variants still > do "checkout topic && rev-list upstream..HEAD" instead of just "rev-list > upstream..topic".
I don't think this is the case any longer for regular rebase, from my reading of the code and doing a rebase under GIT_TRACE. Grepping the history turns up 0cb0664 (rebase [--onto O] A B: omit needless checkout, 2008-03-15).
But doing an interactive rebase under GIT_TRACE, it looks like it still does the unnecessary checkout.
-Peff