提交 f8babc4d 编写于 作者: J Johannes Schindelin 提交者: Junio C Hamano

rebase -i: support single-letter abbreviations for the actions

When you do many rebases, you can get annoyed by having to type out
the actions "edit" or "squash" in total.

This commit helps that, by allowing you to enter "e" instead of "edit",
"p" instead of "pick", or "s" instead of "squash".
Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 2a858ee9
......@@ -232,14 +232,14 @@ do_next () {
'#'*|'')
mark_action_done
;;
pick)
pick|p)
comment_for_reflog pick
mark_action_done
pick_one $sha1 ||
die_with_patch $sha1 "Could not apply $sha1... $rest"
;;
edit)
edit|e)
comment_for_reflog edit
mark_action_done
......@@ -254,7 +254,7 @@ do_next () {
warn
exit 0
;;
squash)
squash|s)
comment_for_reflog squash
has_action "$DONE" ||
......@@ -263,7 +263,7 @@ do_next () {
mark_action_done
make_squash_message $sha1 > "$MSG"
case "$(peek_next_command)" in
squash)
squash|s)
EDIT_COMMIT=
USE_OUTPUT=output
cp "$MSG" "$SQUASH_MSG"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册