Re: [PATCH 2/2] New send-email option smtpserveroptions.

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

 



Pascal Obry <pascal@xxxxxxxx> writes:

> diff --git a/git-send-email.perl b/git-send-email.perl
> index 0063606..e5cdda7 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -60,6 +60,7 @@ git send-email [options] <file | directory | rev-list options >
>      --envelope-sender       <str>  * Email envelope sender.
>      --smtp-server       <str:int>  * Outgoing SMTP server to use. The port
>                                       is optional. Default 'localhost'.
> +    --smtp-server-options   <int>  * Outgoing SMTP server options to use.

Is it really an int?

> @@ -279,6 +282,7 @@ my $rc = GetOptions("sender|from=s" => \$sender,
> ...
> +		    "smtp-server-options=s" => \$smtp_server_options,
> @@ -1015,6 +1019,9 @@ X-Mailer: git-send-email $gitversion
>  		}
>  	}
>  
> +	unshift (@sendmail_parameters, $smtp_server_options)
> +	    if (defined $smtp_server_options);
> +

I suspect this would not work, unless you are aiming to add just a
singular $smtp_server_option, as the actual program invocation looks like
this later in the program:

	} elsif ($smtp_server =~ m#^/#) {
		my $pid = open my $sm, '|-';
		defined $pid or die $!;
		if (!$pid) {
			exec($smtp_server, @sendmail_parameters) or die $!;
		}
		print $sm "$header\n$message";

Somebody in the code before this unshift needs to split the single string
in $smtp_server_options into multiple parameters, or better yet, it needs
to accept more than one --smtp-server-option=foo --smtp-server-option=bar
and accumulate them in @smtp_server_options.

--
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]