Martin von Zweigbergk <martinv...@gmail.com> writes:

> On Tue, Sep 18, 2012 at 12:53 AM, Johannes Sixt <j.s...@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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to