From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH v2] rebase -i: support single-letter abbreviations for the actions
Date: Sat, 29 Sep 2007 03:32:11 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0709290323560.28395@racer.site> (raw)
In-Reply-To: <7vfy0ymd7g.fsf@gitster.siamese.dyndns.org>
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: Johannes Schindelin <johannes.schindelin@gmx.de>
---
On Fri, 28 Sep 2007, Junio C Hamano wrote:
> I am not sure if we want to taint the words merge and amend like
> this. I was hoping someday you would allow people to reorder
> something like this...
Okay, you convinced me.
>
> e
> \
> ---a---b---c---d
>
> into something like this:
>
> e
> \
> ---b'--c'--a'+d'
I thought that this would be possible with "git rebase -p -i"?
Ah no, that does not work; "-p" is not yet graceful enough to
accept reorders. (But then, I do not see why the command should
be "merge" instead of the "pick" we already have...)
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..7a5aaa5 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)
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"
--
1.5.3.2.1102.g9487
next prev parent reply other threads:[~2007-09-29 2:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Johannes Schindelin [this message]
2007-09-29 16:27 ` 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0709290323560.28395@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).