diff options
Diffstat (limited to 'git-rebase--interactive.sh')
| -rw-r--r-- | git-rebase--interactive.sh | 53 |
1 files changed, 4 insertions, 49 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index b68f108f28..59dc4888a6 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -127,54 +127,6 @@ init_revisions_and_shortrevisions () { fi } -complete_action() { - test -s "$todo" || echo noop >> "$todo" - test -z "$autosquash" || git rebase--helper --rearrange-squash || exit - test -n "$cmd" && git rebase--helper --add-exec-commands "$cmd" - - todocount=$(git stripspace --strip-comments <"$todo" | wc -l) - todocount=${todocount##* } - -cat >>"$todo" <<EOF - -$comment_char $(eval_ngettext \ - "Rebase \$shortrevisions onto \$shortonto (\$todocount command)" \ - "Rebase \$shortrevisions onto \$shortonto (\$todocount commands)" \ - "$todocount") -EOF - git rebase--helper --append-todo-help ${keep_empty:+--keep-empty} - - has_action "$todo" || - return 2 - - cp "$todo" "$todo".backup - collapse_todo_ids - git_sequence_editor "$todo" || - die_abort "$(gettext "Could not execute editor")" - - has_action "$todo" || - return 2 - - git rebase--helper --check-todo-list || { - ret=$? - git rebase--helper --checkout-onto "$onto_name" "$onto" \ - "$orig_head" ${verbose:+--verbose} - exit $ret - } - - expand_todo_ids - - test -n "$force_rebase" || - onto="$(git rebase--helper --skip-unnecessary-picks)" || - die "Could not skip unnecessary pick commands" - - git rebase--helper --checkout-onto "$onto_name" "$onto" "$orig_head" \ - ${verbose:+--verbose} - require_clean_work_tree "rebase" - exec git rebase--helper ${force_rebase:+--no-ff} $allow_empty_message \ - --continue -} - git_rebase__interactive () { initiate_action "$action" ret=$? @@ -193,5 +145,8 @@ git_rebase__interactive () { $revisions ${restrict_revision+^$restrict_revision} >"$todo" || die "$(gettext "Could not generate todo list")" - complete_action + exec git rebase--helper --complete-action "$shortrevisions" "$onto_name" \ + "$shortonto" "$orig_head" "$cmd" $allow_empty_message \ + ${autosquash:+--autosquash} ${keep_empty:+--keep-empty} \ + ${verbose:+--verbose} ${force_rebase:+--no-ff} } |
