Re: [PATCH v2] send-email: allow use of basic email list in --cc --to and --bcc

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

 



Jorge-Juan.Garcia-Garcia@xxxxxxxxxxxxxxx writes:

> Changes since v1:
> [...]
>  - did not change the two regexp into one, because it's faster with two

(I find it strange to describe non-change in a list of changes)

I don't think speed is an argument here: it's a one-time operation and
will be instantaneous for the user in any case.

> +sub split_emails {
> +    my ($emails) = @_;
> +    my @split_list;
> +    if ($emails =~ /,/) {
> +	@split_list = split(/,/, $emails);
> +    } else {
> +	@split_list = $emails;
> +    }

Do you need this "if"? Wouldn't split do the right thing if $emails does
not contain comma?

> +    # Removal of unwanted spaces
> +    for (my $j = 0; $j <= $#split_list; $j++) {

Sounds very un-perl-ish. Something like this maybe?

foreach $email (@emails) {
	$email =~ s/^\s+|\s+$//;
}

> +    return @split_list;
> +}

This is indented with tab/spaces mix. Please, use tabs only in Git's
source.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]