From: "Michael S. Tsirkin" <mst@redhat.com>
To: git@vger.kernel.org
Subject: [PATCH] rebase: convert revert to squash on autosquash
Date: Wed, 22 Oct 2014 09:57:14 +0300 [thread overview]
Message-ID: <1413961009-23466-1-git-send-email-mst@redhat.com> (raw)
Reverts can typically be treated like squash. Eliminating both the
original commit and the revert would be even nicer, but this seems a bit
harder to implement.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
git-rebase--interactive.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 86edac7..a82bbdf 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -745,7 +745,7 @@ rearrange_squash () {
while read -r pick sha1 message
do
case "$message" in
- "squash! "*|"fixup! "*|"ack! "*)
+ "squash! "*|"fixup! "*|"ack! "*|"Revert \""*)
action="${message%%!*}"
rest=$message
prefix=
@@ -757,6 +757,12 @@ rearrange_squash () {
prefix="$prefix${rest%%!*},"
rest="${rest#*! }"
;;
+ "Revert \""*\")
+ action="squash"
+ prefix="Revert,"
+ rest="${rest#Revert \"}"
+ rest="${rest%%\"}"
+ ;;
*)
break
;;
--
MST
next reply other threads:[~2014-10-22 6:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 6:57 Michael S. Tsirkin [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-04-07 15:12 [PATCH] rebase: convert revert to squash on autosquash Michael S. Tsirkin
2016-04-07 15:23 ` Johannes Schindelin
2016-04-07 15:51 ` Michael S. Tsirkin
2016-04-08 11:13 ` Johannes Schindelin
2016-04-08 11:42 ` Matthieu Moy
2016-04-08 14:09 ` Michael S. Tsirkin
2016-04-08 11:43 ` Michael S. Tsirkin
2016-04-09 17:17 ` Michael S. Tsirkin
2016-04-08 11:39 ` Matthieu Moy
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=1413961009-23466-1-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=git@vger.kernel.org \
/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).