All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"SZEDER Gábor" <szeder.dev@gmail.com>,
	"Phillip Wood" <phillip.wood@dunelm.org.uk>,
	"Phillip Wood" <phillip.wood@dunelm.org.uk>
Subject: [PATCH 2/4] rebase -i: Add another reword test
Date: Fri, 13 Aug 2021 13:07:31 +0000	[thread overview]
Message-ID: <511cf9204ad5a785ffb2e2eebc757a4e58579826.1628860053.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1015.git.1628860053.gitgitgadget@gmail.com>

From: Phillip Wood <phillip.wood@dunelm.org.uk>

None of the existing reword tests check that there are no uncommitted
changes when the editor is opened. Reuse the editor script from the
last commit to fix this omission.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
---
 t/t3404-rebase-interactive.sh | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 66bcbbf9528..d877872e8f4 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -839,6 +839,19 @@ test_expect_success 'reword' '
 	git show HEAD~2 | grep "C changed"
 '
 
+test_expect_success 'no uncommited changes when rewording the todo list is reloaded' '
+	git checkout E &&
+	test_when_finished "git checkout @{-1}" &&
+	(
+		set_fake_editor &&
+		GIT_SEQUENCE_EDITOR="\"$PWD/fake-editor.sh\"" &&
+		export GIT_SEQUENCE_EDITOR &&
+		set_reword_editor &&
+		FAKE_LINES="reword 1 reword 2" git rebase -i C
+	) &&
+	check_reworded_commits D E
+'
+
 test_expect_success 'rebase -i can copy notes' '
 	git config notes.rewrite.rebase true &&
 	git config notes.rewriteRef "refs/notes/*" &&
-- 
gitgitgadget


  parent reply	other threads:[~2021-08-13 13:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 13:07 [PATCH 0/4] rebase -r: some merge related fixes Phillip Wood via GitGitGadget
2021-08-13 13:07 ` [PATCH 1/4] rebase -r: make 'merge -c' behave like reword Phillip Wood via GitGitGadget
2021-08-13 13:07 ` Phillip Wood via GitGitGadget [this message]
2021-08-13 13:07 ` [PATCH 3/4] rebase -r: don't write .git/MERGE_MSG when fast-forwarding Phillip Wood via GitGitGadget
2021-08-17 17:26   ` SZEDER Gábor
2021-08-19 10:09     ` Phillip Wood
2021-08-13 13:07 ` [PATCH 4/4] rebase -r: fix merge -c with a merge strategy Phillip Wood via GitGitGadget
2021-08-14 22:43 ` [PATCH 0/4] rebase -r: some merge related fixes Johannes Schindelin
2021-08-19 10:07   ` Phillip Wood
2021-08-20 15:40 ` [PATCH v2 " Phillip Wood via GitGitGadget
2021-08-20 15:40   ` [PATCH v2 1/4] rebase -r: make 'merge -c' behave like reword Phillip Wood via GitGitGadget
2021-08-20 15:40   ` [PATCH v2 2/4] rebase -i: Add another reword test Phillip Wood via GitGitGadget
2021-08-20 15:40   ` [PATCH v2 3/4] rebase -r: don't write .git/MERGE_MSG when fast-forwarding Phillip Wood via GitGitGadget
2021-08-20 15:40   ` [PATCH v2 4/4] rebase -r: fix merge -c with a merge strategy Phillip Wood via GitGitGadget
2021-08-24 13:33   ` [PATCH v2 0/4] rebase -r: some merge related fixes 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=511cf9204ad5a785ffb2e2eebc757a4e58579826.1628860053.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=szeder.dev@gmail.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 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.