git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Andrew Pimlott <andrew@pimlott.net>
To: Junio C Hamano <gitster@pobox.com>,
	Thomas Rast <trast@inf.ethz.ch>, git <git@vger.kernel.org>
Subject: Re: [PATCH] rebase -i: fixup fixup! fixup!
Date: Wed, 26 Jun 2013 15:00:26 -0700	[thread overview]
Message-ID: <1372283778-sup-5704@pimlott.net> (raw)
In-Reply-To: <1372198415-sup-2114@pimlott.net>

Excerpts from Andrew Pimlott's message of Tue Jun 25 16:03:52 -0700 2013:
> Thomas's patch didn't do this: fixup! or squash! after the first is
> simply discarded, so you see:
> 
>     pick d78c915 original
>     fixup 0c6388e fixup! original
>     fixup d15b556 fixup! original
>     fixup 1e39bcd fixup! original
> 
> But it will be a simple change to keep all the fixup!s and squash!s.  I
> will do this (and try to make up for the carelessness of my previous
> patch).

In order to test this, I wrote a helper function to dump the rebase -i
todo list.  Would you like this introduced in its own patch, or
combined?  See below.

Andrew

---8<---
Subject: [PATCH] lib-rebase: set_cat_todo_editor

Add a helper for testing rebase -i todo lists.  This can be used to verify
the expected user experience, even for todo list changes that do not affect
the outcome of rebase.

Signed-off-by: Andrew Pimlott <andrew@pimlott.net>
---
 t/lib-rebase.sh |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index 4b74ae4..d118dd6 100644
--- a/t/lib-rebase.sh
+++ b/t/lib-rebase.sh
@@ -66,6 +66,19 @@ EOF
 	chmod a+x fake-editor.sh
 }
 
+# After set_cat_todo_editor, rebase -i will write the todo list (ignoring
+# blank lines and comments) to stdout, and exit failure.
+
+set_cat_todo_editor () {
+	echo "#!$SHELL_PATH" >fake-editor.sh
+	cat >> fake-editor.sh <<\EOF
+grep "^[^#]" "$1"
+exit 1
+EOF
+	chmod a+x fake-editor.sh
+	test_set_editor "$(pwd)/fake-editor.sh"
+}
+
 # checks that the revisions in "$2" represent a linear range with the
 # subjects in "$1"
 test_linear_range () {
-- 
1.7.10.4

  reply	other threads:[~2013-06-26 22:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11 18:05 rebase --autosquash does not handle fixup! of fixup! Andrew Pimlott
2013-06-11 18:50 ` Thomas Rast
2013-06-14 19:31   ` [PATCH] rebase -i: fixup fixup! fixup! Andrew Pimlott
2013-06-15  6:50     ` Andrew Pimlott
2013-06-15 10:07       ` Junio C Hamano
2013-06-16  1:19         ` Junio C Hamano
2013-06-16 11:08         ` Thomas Rast
2013-06-17  2:38           ` Junio C Hamano
2013-06-17  8:07             ` Thomas Rast
2013-06-17 14:27               ` Junio C Hamano
2013-06-25 20:41                 ` Andrew Pimlott
2013-06-25 21:33                   ` Junio C Hamano
2013-06-25 23:17                     ` Andrew Pimlott
2013-06-25 21:36                   ` Junio C Hamano
2013-06-25 21:45                   ` Junio C Hamano
2013-06-25 22:01                     ` Junio C Hamano
2013-06-25 23:03                     ` Andrew Pimlott
2013-06-26 22:00                       ` Andrew Pimlott [this message]
2013-06-26 23:48                         ` Junio C Hamano
2013-06-27  0:20                           ` Andrew Pimlott
2013-06-27 19:26                             ` Andrew Pimlott
2013-06-27 20:52                               ` Junio C Hamano
2013-06-28 14:20                                 ` Andrew Pimlott

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372283778-sup-5704@pimlott.net \
    --to=andrew@pimlott.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=trast@inf.ethz.ch \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).