Re: [PATCH] - git-send-email.perl

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

 



Joe Perches <[email protected]> writes:

> Here's a path to enable a command line option
> that takes a string argument
>
> 	cc-cmd
>
> This modifies the @cc array to include whatever
> output is produced by cc_cmd $patchfile
>
> cccmd can be stored in a config settings file
>
> previous versions of this patch were submitted
> against an older version of git-send-email.perl

... Signed-off-by: ...


> diff --git a/git-send-email.perl b/git-send-email.perl
> index 69559b2..828a77a 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -46,6 +46,9 @@ Options:
>     --cc           Specify an initial "Cc:" list for the entire series
>                    of emails.
>  
> +   --cc-cmd       Specify a command to execute per file which adds
> +                  per file specific cc address entries
> +
>     --bcc          Specify a list of email addresses that should be Bcc:
>  		  on all the emails.
>  

I do not see a patch to "Documentation/git-send-email.txt" here...

> @@ -652,11 +657,21 @@ foreach my $t (@files) {
>  		}
>  	}
>  	close F;
> +
> +	if (${cc_cmd} ne "") {
> +	    my $output = `${cc_cmd} $t`;
> +	    my @lines = split("\n", $output);
> +	    foreach my $c (@lines) {
> +		push @cc, $c;
> +		printf("(cc-cmd) Adding cc: %s from: '%s'\n", $c, $cc_cmd)
> +		    unless $quiet;
> +	    }
> +	}
> +

Something like this, with appropriate error checking, perhaps?

	open my $cc, "${cc_cmd} $t |";
        while (my $c = <$cc>) {
        	...
	}
        close $cc;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux