]> git.ipfire.org Git - thirdparty/git.git/commit
rebase -i: run without forking rebase--interactive
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Wed, 17 Apr 2019 14:30:44 +0000 (15:30 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Apr 2019 08:32:10 +0000 (17:32 +0900)
commit460bc3ce7386582b3259f8e3a2c1ace443ddb1ae
treeac25ce673e0da66daf44aaf7d5edda7023da3d26
parent297b1e177377444cba9a5364a4c6ce676ededb4d
rebase -i: run without forking rebase--interactive

When the builtin rebase starts an interactive rebase it parses the
options and then repackages them and forks
`rebase--interactive`. Separate the option parsing in
cmd_rebase__interactive() from the business logic to allow interactive
rebases can be run without forking `rebase__interactive` by calling
run_rebase_interactive() directly.

Starting interactive rebases without forking makes it easy to debug
the sequencer without worrying about attaching to child
processes. Ævar has also reported that some of the rebase perf tests
are 30% faster [1].

This patch also makes it easy to remove cmd_rebase__interactive() in
the future when git-legacy-rebase.sh and
git-rebase--preserve-merges.sh are retired.

[1] https://public-inbox.org/git/87y359cfjj.fsf@evledraar.gmail.com/

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rebase.c