Re: [RFC/PATCH] git-send-email: Remember sources of Cc addresses

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

 



On Wed, May 04, 2011 at 06:12:08PM +0200, Jakub Narebski wrote:

> > Sure. Since you are actually doing SMTP, you have much more flexibility
> > in knowing what errors happen. Look in git-send-email.perl's
> > send_message, around line 1118. We use the Mail::SMTP module, but we
> > just feed it the whole recipient list and barf if any of them is
> > rejected. You could probably remember which recipients are "important"
> > (i.e., given on the command line) and which were pulled automatically
> > from the commit information, and then feed each recipient individually.
> > If important ones fail, abort the message. If an unimportant one fails,
> > send the message anyway, but remember the bad address and report the
> > error at the end.
> [...]
> This is an RFC patch preparing the way, so to speak, by remembering
> where each Cc address came from.  We could in the future treat
> $cc{'body'} / all_cc('body') differently from the rest of all_cc().
> 
> Is the approach taken here sane?

Yeah, from my cursory read, it looks like a good step forward, and I
didn't see any obvious bugs.

You'll need still more refactoring in send_message to treat them
differently at the SMTP level. We collapse all of the addresses down to
a single list via unique_email_list (and we obviously want to keep this
unique-ifying step), but that final list will have to remember where
each address came from.

> +sub all_cc {
> +	my @keys = @_;
> +	@keys = qw(initial from cc body cc-cmd) unless @keys;
> +	return map { ref($_) ? @$_ : () } @cc{@keys};
> +
> +	#return map { ref($_) ? @$_ : () } values %cc;
> +}

Nit: debugging cruft. :)

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