From: Stefan Agner <stefan@agner.ch>
To: Junio C Hamano <gitster@pobox.com>
Cc: Lars Wendler <polynomial-c@gentoo.org>,
git@vger.kernel.org, juston.h.li@gmail.com,
Junio C Hamano <jch2355@gmail.com>
Subject: Re: [PATCH] git-send-email.perl: Fixed sending of many/huge changes/patches
Date: Thu, 01 Oct 2015 16:43:56 -0700 [thread overview]
Message-ID: <ddfab710e6ee78f6890b92d5b8af3bee@agner.ch> (raw)
In-Reply-To: <xmqqr3lf94o2.fsf@gitster.mtv.corp.google.com>
On 2015-09-30 10:51, Junio C Hamano wrote:
> Lars Wendler <polynomial-c@gentoo.org> writes:
>
>> It seems to me that there is a size limit, after cutting down the patch
>> to ~16K, sending started to work. I cut it twice, once by removing lines
>> from the head and once from the bottom, in both cases at the size of
>> around 16K I could send the patch.
>>
>> See also original report:
>> http://permalink.gmane.org/gmane.comp.version-control.git/274569
>>
>> Reported-by: Juston Li <juston.h.li@gmail.com>
>> Tested-by: Markos Chandras <hwoarang@gentoo.org>
>> Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
>> ---
>> git-send-email.perl | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/git-send-email.perl b/git-send-email.perl
>> index e3ff44b..e907e0ea 100755
>> --- a/git-send-email.perl
>> +++ b/git-send-email.perl
>> @@ -1365,7 +1365,11 @@ Message-Id: $message_id
>> $smtp->mail( $raw_from ) or die $smtp->message;
>> $smtp->to( @recipients ) or die $smtp->message;
>> $smtp->data or die $smtp->message;
>> - $smtp->datasend("$header\n$message") or die $smtp->message;
>> + $smtp->datasend("$header\n") or die $smtp->message;
>> + my @lines = split /^/, $message;
>> + foreach my $line (@lines) {
>> + $smtp->datasend("$line") or die $smtp->message;
>> + }
>
Hi,
> Thanks. One and a half comments.
>
> * If 16k is the limit, and smtp payload line limit is much much
> shorter than that, is it sensible to send data line by line?
It was a easy and quick way which popped into my mind. The 16k limit has
been evaluated just by trying out some patch sizes, not sure whether
that is really right and where that really comes from. I guess before
using this as split size one would need to understand what causes that
limit actually...
> * Has this been reported to Net::Cmd::datasend() upstream?
Not by me. I also have to admit that I am not a perl hacker at all...
--
Stefan
>
>> $smtp->dataend() or die $smtp->message;
>> $smtp->code =~ /250|200/ or die "Failed to send $subject\n".$smtp->message;
>> }
next prev parent reply other threads:[~2015-10-01 23:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 7:26 [PATCH] git-send-email.perl: Fixed sending of many/huge changes/patches Lars Wendler
2015-09-30 8:32 ` Johannes Schindelin
2015-09-30 17:51 ` Junio C Hamano
2015-10-01 23:43 ` Stefan Agner [this message]
2015-11-24 0:38 ` Stefan Agner
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=ddfab710e6ee78f6890b92d5b8af3bee@agner.ch \
--to=stefan@agner.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jch2355@gmail.com \
--cc=juston.h.li@gmail.com \
--cc=polynomial-c@gentoo.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).