From: Uwe Storbeck <uwe@ibr.ch>
To: git@vger.kernel.org
Subject: [PATCH/RFC] t3404: test autosquash for fixup! commits with funny messages
Date: Sat, 15 Mar 2014 00:58:11 +0100 [thread overview]
Message-ID: <20140314235811.GA4213@ibr.ch> (raw)
This commit adds a test to verify the correct behavior when
rebase -i is used to autosquash fixup! commits where the commit
message contains a backslash sequence (\n).
When echo is used instead of printf to handle such a commit
message the test will fail on shells (e.g. dash) where the echo
command interprets backslash sequences as control characters.
Signed-off-by: Uwe Storbeck <uwe@ibr.ch>
---
t/t3404-rebase-interactive.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 50e22b1..6d32661 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -798,6 +798,18 @@ test_expect_success 'rebase-i history with funny messages' '
test_cmp expect actual
'
+test_expect_success 'autosquash fixup! commits with funny messages' '
+ test_when_finished "git rebase --abort || :" &&
+ echo >>file1 &&
+ git commit -a -m "something that looks like a newline (\n)" &&
+ echo >>file1 &&
+ git commit -a --fixup HEAD &&
+ set_fake_editor &&
+ FAKE_LINES="" &&
+ export FAKE_LINES &&
+ git rebase -i --autosquash HEAD~2
+'
+
test_expect_success 'prepare for rebase -i --exec' '
git checkout master &&
--
1.9.0
reply other threads:[~2014-03-14 23:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20140314235811.GA4213@ibr.ch \
--to=uwe@ibr.ch \
--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).