Re: [PATCH] git-send-email.perl: Fixed sending of many/huge changes/patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2015-09-30 10:51, Junio C Hamano wrote:
> Lars Wendler <polynomial-c@xxxxxxxxxx> 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@xxxxxxxxx>
>> Tested-by: Markos Chandras <hwoarang@xxxxxxxxxx>
>> Signed-off-by: Lars Wendler <polynomial-c@xxxxxxxxxx>
>> ---
>>  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;
>> +		}
> 
> 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?
> 
>  * Has this been reported to Net::Cmd::datasend() upstream?

I still constantly run in to this issue. Fixing it locally, and next
time git gets updated and I send a larger patch, it happens again.

Just dig a bit more into that, it seems that this is a documented Perl
limitation:
http://search.cpan.org/~sullr/IO-Socket-SSL-2.020/lib/IO/Socket/SSL.pod#syswrite

All examples use datasend line wise, so I guess it is not a all to bad
choice...

--
Stefan


> 
>>  		$smtp->dataend() or die $smtp->message;
>>  		$smtp->code =~ /250|200/ or die "Failed to send $subject\n".$smtp->message;
>>  	}
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]