All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rebase: convert revert to squash on autosquash
@ 2016-04-07 15:12 Michael S. Tsirkin
  2016-04-07 15:23 ` Johannes Schindelin
  0 siblings, 1 reply; 10+ messages in thread
From: Michael S. Tsirkin @ 2016-04-07 15:12 UTC (permalink / raw)
  To: git

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 6a766ca..6fc1935 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -777,7 +777,7 @@ rearrange_squash () {
 	do
 		test -z "${format}" || message=$(git log -n 1 --format="%s" ${sha1})
 		case "$message" in
-		"squash! "*|"fixup! "*|"ack! "*)
+		"squash! "*|"fixup! "*|"ack! "*|"Revert \""*)
 			action="${message%%!*}"
 			rest=$message
 			prefix=
@@ -789,6 +789,12 @@ rearrange_squash () {
 					prefix="$prefix${rest%%!*},"
 					rest="${rest#*! }"
 					;;
+				"Revert \""*\")
+					action="squash"
+					prefix="Revert,"
+					rest="${rest#Revert \"}"
+					rest="${rest%%\"}"
+					;;
 				*)
 					break
 					;;
-- 
MST

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] rebase: convert revert to squash on autosquash
@ 2014-10-22  6:57 Michael S. Tsirkin
  0 siblings, 0 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2014-10-22  6:57 UTC (permalink / raw)
  To: git

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

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

end of thread, other threads:[~2016-04-09 17:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2014-10-22  6:57 Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.