builtin rebase: prepare for builtin rebase -i
commitbc24382c2b300a1ba135985b6376b32f8ea8f836
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 5 Oct 2018 15:54:38 +0000 (5 08:54 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Oct 2018 05:18:47 +0000 (11 14:18 +0900)
tree1b2ef08957125f42e3d686a6504486681897eb70
parent5ab7e0fb67007bd4829b85a8b450bd952e97fe00
builtin rebase: prepare for builtin rebase -i

The builtin rebase and the builtin interactive rebase have been
developed independently, on purpose: Google Summer of Code rules
specifically state that students have to work on independent projects,
they cannot collaborate on the same project.

One fallout is that the rebase-in-c and rebase-i-in-c patches cause no
merge conflicts but a royal number of tests in the test suite to fail.

It is easy to explain why: rebase-in-c was developed under the
assumption that all rebase backends are implemented in Unix shell script
and can be sourced via `. git-rebase--<backend>`, which is no longer
true with rebase-i-in-c, where git-rebase--interactive is a hard-linked
builtin.

This patch fixes that.

Please note that we also skip the finish_rebase() call for interactive
rebases because the built-in interactive rebase already takes care of
that. This is needed to support the upcoming `break` command that wants
to interrupt the rebase with exit code 0 (and naturally wants to keep
the state directory intact when doing so).

While at it, remove the `case` arm for the interactive rebase that is
now skipped in favor of the short-cut to the built-in rebase.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rebase.c