Skip to content

Commit fc09bd5

Browse files
committed
rebase -i: use the rebase--helper builtin
Now that the sequencer learned to process a "normal" interactive rebase, we use it. The original shell script is still used for "non-normal" interactive rebases, i.e. when --root or --preserve-merges was passed. Please note that the --root option (via the $squash_onto variable) needs special handling only for the very first command, hence it is still okay to use the helper upon continue/skip. Also please note that the --no-ff setting is volatile, i.e. when the interactive rebase is interrupted at any stage, there is no record of it. Therefore, we have to pass it from the shell script to the rebase--helper. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 92cdd40 commit fc09bd5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

git-rebase--interactive.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,10 @@ git_rebase__interactive () {
10591059

10601060
case "$action" in
10611061
continue)
1062+
if test ! -d "$rewritten"
1063+
then
1064+
exec git rebase--helper ${force_rebase:+--no-ff} --continue
1065+
fi
10621066
# do we have anything to commit?
10631067
if git diff-index --cached --quiet HEAD --
10641068
then
@@ -1118,6 +1122,10 @@ first and then run 'git rebase --continue' again.")"
11181122
skip)
11191123
git rerere clear
11201124

1125+
if test ! -d "$rewritten"
1126+
then
1127+
exec git rebase--helper ${force_rebase:+--no-ff} --continue
1128+
fi
11211129
do_rest
11221130
return 0
11231131
;;
@@ -1304,6 +1312,11 @@ expand_todo_ids
13041312
test -d "$rewritten" || test -n "$force_rebase" || skip_unnecessary_picks
13051313

13061314
checkout_onto
1315+
if test -z "$rebase_root" && test ! -d "$rewritten"
1316+
then
1317+
require_clean_work_tree "rebase"
1318+
exec git rebase--helper ${force_rebase:+--no-ff} --continue
1319+
fi
13071320
do_rest
13081321

13091322
}

0 commit comments

Comments
 (0)