From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: Re: [PATCH V3] git-send-email.perl: Add --to-cmd Date: Fri, 24 Sep 2010 09:06:34 -0700 Message-ID: <1285344394.11616.23.camel@Joe-Laptop> References: <1285227413.7286.47.camel@Joe-Laptop> <20100923090931.GA29789@albatros> <20100923120024.GA26715@albatros> <1285253867.31572.13.camel@Joe-Laptop> <1285262237.31572.18.camel@Joe-Laptop> <1285263993.31572.25.camel@Joe-Laptop> <1285267520.31572.34.camel@Joe-Laptop> <7v62xwqe7i.fsf@alter.siamese.dyndns.org> <1285291098.25928.220.camel@Joe-Laptop> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Junio C Hamano , =?ISO-8859-1?Q?=C6var_Arnfj=F6r=F0?= Bjarmason , Julia Lawall , git@vger.kernel.org, Vasiliy Kulikov , Matt Mooney , kernel-janitors@vger.kernel.org, Dan Carpenter To: Jakub Narebski X-From: git-owner@vger.kernel.org Fri Sep 24 18:06:44 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OzAnL-00072x-DB for gcvg-git-2@lo.gmane.org; Fri, 24 Sep 2010 18:06:43 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932380Ab0IXQGh (ORCPT ); Fri, 24 Sep 2010 12:06:37 -0400 Received: from mail.perches.com ([173.55.12.10]:2333 "EHLO mail.perches.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932375Ab0IXQGg (ORCPT ); Fri, 24 Sep 2010 12:06:36 -0400 Received: from [192.168.1.162] (unknown [192.168.1.162]) by mail.perches.com (Postfix) with ESMTP id 8C53A24368; Fri, 24 Sep 2010 09:06:26 -0700 (PDT) In-Reply-To: X-Mailer: Evolution 2.30.3 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Fri, 2010-09-24 at 08:32 -0700, Jakub Narebski wrote: > Joe Perches writes: > > +# Execute a command (ie: $to_cmd) to get a list of email addresses > > +# and return a results array > > +sub recipients_cmd(@) { > Do not use subroutine prototypes: they do not do what you think they > do. In this case using prototype is unnecessary and can be dangerous. It can be removed. I was following the form of the other returned array in the code. sub unique_email_list(@) { > > + while() { > > + my $address = $_; > > + $address =~ s/^\s*//g; > > + $address =~ s/\n$//g; > Hmmm... why does it remove leading, but not trailing whitespace? Unmodified from the current. I agree it should do both.