git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rebase -i: support single-letter abbreviations for the actions
@ 2007-09-29  1:31 Johannes Schindelin
  2007-09-29  2:12 ` Junio C Hamano
  2007-09-29 16:27 ` [PATCH] " Avi Kivity
  0 siblings, 2 replies; 9+ messages in thread
From: Johannes Schindelin @ 2007-09-29  1:31 UTC (permalink / raw)
  To: gitster, git


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",
or "s" instead of "squash", and it also plays nice with "merge" or "amend"
as synonyms to "squash".

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 git-rebase--interactive.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 823291d..0f9483e 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -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|merge|m|amend|a)
 		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|merge|m|amend|a)
 			EDIT_COMMIT=
 			USE_OUTPUT=output
 			cp "$MSG" "$SQUASH_MSG"
-- 
1.5.3.2.1102.g9487

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-09-29 23:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-29  1:31 [PATCH] rebase -i: support single-letter abbreviations for the actions Johannes Schindelin
2007-09-29  2:12 ` Junio C Hamano
2007-09-29  2:32   ` [PATCH v2] " Johannes Schindelin
2007-09-29 16:27 ` [PATCH] " Avi Kivity
2007-09-29 20:58   ` Johannes Schindelin
2007-09-29 21:13     ` Avi Kivity
2007-09-29 21:48       ` Johannes Schindelin
2007-09-29 22:08         ` Junio C Hamano
2007-09-29 23:34           ` [PATCH] rebase -i: squash should retain the authorship of the _first_ commit Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).