Re: [PATCH] Authenticate only once in git-send-email

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

 



Wincent Colaiuta <win@xxxxxxxxxxx> writes:

> This commit teaches git-send-email to authenticate once and only once at
> the beginning of the series.

Ok.  What does $smtp->auth() return?  Presumably a true value,
but I do not find it the best coding style to hide a call made
primarily for its effects not for its return value behind a
conditional assignment to a boolean.  Eek.

>  		if ((defined $smtp_authuser) && (defined $smtp_authpass)) {
> -			$smtp->auth( $smtp_authuser, $smtp_authpass ) or die $smtp->message;
> +			$auth ||= $smtp->auth( $smtp_authuser, $smtp_authpass ) or die $smtp->message;
>  		}

Perhaps something along the lines of...

>  		if ((defined $smtp_authuser) && (defined $smtp_authpass)) {
> 			$smtp->auth( $smtp_authuser, $smtp_authpass ) or die $smtp->message;
> +			undef $smtp_authpass;
>  		}

... or using a separate boolean variable "my $auth_happened"
may be more appropriate.

But I am just saying this; I do not care _too_ deeply about it.
Will apply as-is.
 


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

  Powered by Linux