From: Adam Piatyszek <ediap@users.sourceforge.net>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] git-send-email.perl: check for lines longer than 998 characters
Date: Fri, 18 Jan 2008 10:42:05 +0100 [thread overview]
Message-ID: <4790746D.1000502@users.sourceforge.net> (raw)
In-Reply-To: <47905F70.5090003@viscovery.net>
Hi,
* Johannes Sixt [18 I 2008 09:12]:
> Is it good to die() in this situation? If you are sending a patch series
> and one patch in the middle triggers this condition, then only half of the
> series is sent. Maybe it would be better to warn here only, collect file
> names of the suspects, send the patch nevertheless, and write a summary at
> the end?
Unfortunately, my experience in perl programming is very, very limited.
So, I did not prepared the final solution for this problem. ;-) The
patch was intended as a startup of a discussion how to fix this issue.
IMHO it does not make much sense to send such patches nevertheless, if
we are sure that they will be broken after SMTP transfer. Such a
situation is similar to spamming. And sending only the ones that can be
sent is not an option as well.
The proper solution would be to implement conditional encoding of such
patches, e.g. quoted-printable as suggested by Peff, and warn users that
some patches were send as encoded. Also an explicit option
"--transfer-enc" might be added to control such a behaviour manually.
I guess, git send-email might reuse the code from this perl module:
http://search.cpan.org/src/GAAS/MIME-Base64-Perl-1.00/lib/MIME/QuotedPrint/Perl.pm
to implement the encoding routine.
There are although two things to implement:
1) When too long line is detected, the whole message body has to be
encoded with QP.
2) Proper "Content-Transfer-Encoding: quoted-printable" needs to be set
in the headers.
BTW, is "git am" or "git apply" able to decode the QP encoded message
body? I guess yes, since it works with patches attached to emails as well...
Comments?
BR,
/Adam
--
.:. Adam Piatyszek (ediap) .:.....................................:.
.:. ediap@users.sourceforge.net .:................................:.
next prev parent reply other threads:[~2008-01-18 9:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-17 10:10 [BUG] git send-email brakes patches with very long lines Adam Piatyszek
2008-01-17 13:13 ` Adam Piatyszek
2008-01-17 13:26 ` Adam Piatyszek
2008-01-17 15:32 ` Jeff King
2008-01-18 7:47 ` [PATCH] git-send-email.perl: check for lines longer than 998 characters Adam Piątyszek
2008-01-18 8:12 ` Johannes Sixt
2008-01-18 9:42 ` Adam Piatyszek [this message]
2008-01-18 10:01 ` Johannes Sixt
2008-01-18 10:08 ` Junio C Hamano
2008-01-18 10:37 ` Adam Piatyszek
2008-01-18 11:01 ` Junio C Hamano
2008-01-18 14:16 ` Jeff King
2008-01-18 14:19 ` [PATCH 1/3] send-email: detect invocation errors earlier Jeff King
2008-01-18 14:19 ` [PATCH 2/3] send-email: validate patches before sending anything Jeff King
2008-01-18 15:09 ` Johannes Sixt
2008-01-18 19:09 ` Jeff King
2008-01-18 17:39 ` Jay Soffian
2008-01-18 19:12 ` Jeff King
2008-01-18 14:20 ` [PATCH 3/3] send-email: add no-validate option Jeff King
2008-01-18 20:57 ` [PATCH] git-send-email.perl: check for lines longer than 998 characters Junio C Hamano
2008-01-18 21:30 ` Jeff King
2008-01-20 22:35 ` Adam Piatyszek
2008-01-20 22:53 ` Jeff King
2008-01-21 10:21 ` Adam Piatyszek
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=4790746D.1000502@users.sourceforge.net \
--to=ediap@users.sourceforge.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=peff@peff.net \
/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).