rebase -i: Teach "--edit-todo" action
This allows users to edit the todo file while they're stopped in the middle of an interactive rebase. When this action is executed, all comments from the original todo file are stripped, and new help messages are appended to the end. Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
fcc5ef1cc9
commit
eb9a7cb4bd
@ -792,6 +792,23 @@ skip)
|
||||
|
||||
do_rest
|
||||
;;
|
||||
edit-todo)
|
||||
sed -e '/^#/d' < "$todo" > "$todo".new
|
||||
mv -f "$todo".new "$todo"
|
||||
append_todo_help
|
||||
cat >> "$todo" << EOF
|
||||
#
|
||||
# You are editing the todo file of an ongoing interactive rebase.
|
||||
# To continue rebase after editing, run:
|
||||
# git rebase --continue
|
||||
#
|
||||
EOF
|
||||
|
||||
git_sequence_editor "$todo" ||
|
||||
die "Could not execute editor"
|
||||
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
git var GIT_COMMITTER_IDENT >/dev/null ||
|
||||
|
||||
Reference in New Issue
Block a user