Re: [PATCHv2] am: fix patch format detection for Thunderbird "Save As" emails
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 18, 2009, 23:49 UTC
- Message-ID
- <7vmy1fsv0e.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <loom.20091218T223918-175@post.gmane.org>
Eric Blake <ebb9@byu.net> writes:
Show 11 quoted lines
> 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.
Also we probably want to change the "only munge the first three lines" to something like:
format-patch --stdout |
sed -e 's/$/Q/' |
tr 'Q' '\015'picking some 'Q' that we know does not appear in the text.