From: Stephen Boyd <bebarino@gmail.com>
To: Eric Blake <ebb9@byu.net>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCHv2] am: fix patch format detection for Thunderbird "Save As" emails
Date: Fri, 18 Dec 2009 13:59:37 -0800 [thread overview]
Message-ID: <1261173577.14059.5.camel@swboyd-laptop> (raw)
In-Reply-To: <loom.20091218T223918-175@post.gmane.org>
On Fri, 2009-12-18 at 21:42 +0000, Eric Blake wrote:
> Stephen Boyd <bebarino <at> gmail.com> writes:
>
> > + {
> > + echo "X-Fake-Field: Line One\015" &&
>
> echo and \ do not portably mix. For that matter, shell double quotes and
> backslash escapes that are not required by POSIX do not portably mix. To
> reliably create carriage returns in shell, you need to use printf, or else
> something like:
>
> echo "...@" | tr '@' '\015'
>
Thanks. Hopefully squashing this in will make it even more portable?
--->8---
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 7b6269d..19d5ca1 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -84,18 +84,18 @@ test_expect_success setup '
git format-patch --stdout first | sed -e "1d"
} > patch1.eml &&
{
- echo "X-Fake-Field: Line One\015" &&
- echo "X-Fake-Field: Line Two\015" &&
- echo "X-Fake-Field: Line Three\015" &&
+ printf "X-Fake-Field: Line One\015\n" &&
+ printf "X-Fake-Field: Line Two\015\n" &&
+ printf "X-Fake-Field: Line Three\015\n" &&
git format-patch --stdout first |
sed -e "1d" -e "3,\$d" | tr -d "\n" &&
- echo "\015" &&
+ printf "\015\n" &&
git format-patch --stdout first |
sed -e "1,2d" -e "4,\$d" | tr -d "\n" &&
- echo "\015" &&
+ printf "\015\n" &&
git format-patch --stdout first |
sed -e "1,3d" -e "5,\$d" | tr -d "\n" &&
- echo "\015\n\015" &&
+ printf "\015\n\015\n" &&
git format-patch --stdout first | sed -e "1,5d"
} > patch1-crlf.eml &&
sed -n -e "3,\$p" msg >file &&
next prev parent reply other threads:[~2009-12-18 21:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 23:58 [PATCH] am: fix patch format detection for Thunderbird "Save As" emails Stephen Boyd
2009-12-18 0:15 ` Junio C Hamano
2009-12-18 21:34 ` [PATCHv2] " Stephen Boyd
2009-12-18 21:42 ` Eric Blake
2009-12-18 21:59 ` Stephen Boyd [this message]
2009-12-18 22:42 ` Eric Blake
2009-12-19 2:24 ` Stephen Boyd
2009-12-19 5:38 ` Eric Blake
2009-12-19 6:21 ` Stephen Boyd
2009-12-19 7:07 ` Stephen Boyd
2009-12-19 7:39 ` Junio C Hamano
2009-12-19 11:49 ` Stephen Boyd
2009-12-19 10:26 ` Andreas Schwab
2009-12-18 23:49 ` Junio C Hamano
2010-01-05 22:38 ` Nanako Shiraishi
2010-01-21 18:51 ` Stephen Boyd
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=1261173577.14059.5.camel@swboyd-laptop \
--to=bebarino@gmail.com \
--cc=ebb9@byu.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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 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).