Re: [RFC PATCH] add t3420-rebase-topology
- From
Chris Webb <chris@arachsys.com>
- Date
- Sep 27, 2012, 12:20 UTC
- Message-ID
- <20120927122035.GL16059@arachsys.com>
- In-Reply-To
- <CANiSa6i+A6fkWpkPMXiBRdT48LaSfPe2yki+AmWFAKYg02p=+g@mail.gmail.com>
Martin von Zweigbergk <martinvonz@gmail.com> writes:
Show 8 quoted lines
> On Tue, Sep 18, 2012 at 12:53 AM, Johannes Sixt <j.sixt@viscovery.net> wrote: > > > Why? Is it more like "--root implies --force"? > > It doesn't currently exactly imply --force, but the effect is the > same. Also see my reply to Junio's email in this thread. > > Maybe Chris has some thoughts on this?
Hi Martin and Johannes. Sorry for the slow follow-up here.
You're right that rebase --root without --onto always creates a brand new root as a result of the implementation using a sentinel commit. Clearly this is what's wanted with --interactive, but rebase --root with neither --onto nor --interactive is a slightly odd combination for which I struggle to imagine a natural use. Perhaps you're right that for consistency it should be a no-op unless --force-rebase is given?
If we did this, this combination would be a no-op unconditionally as by definition we're always descended from the root of our current commit. However, given the not-very-useful behaviour, I suspect that rebase --root is much more likely to be a mistyped version of rebase -i --root than rebase --root --force-rebase. (Unless I'm missing a reasonable use for this? History linearisation perhaps?)
Best wishes,
Chris.