From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: [PATCH v4 1/2] Documentation: fix linkgit references Date: Wed, 4 May 2016 18:11:27 -0400 Message-ID: <20160504221127.GB26339@sigill.intra.peff.net> References: <1462351116-19308-1-git-send-email-larsxschneider@gmail.com> <1462351116-19308-2-git-send-email-larsxschneider@gmail.com> <5729DF25.7030503@ramsayjones.plus.com> <20160504192516.GD21259@sigill.intra.peff.net> <20160504200635.GA22787@sigill.intra.peff.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Junio C Hamano , Lars Schneider , Ramsay Jones , Git , Matthieu Moy , Stefan Beller To: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason X-From: git-owner@vger.kernel.org Thu May 05 00:11:35 2016 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ay514-0003MY-EE for gcvg-git-2@plane.gmane.org; Thu, 05 May 2016 00:11:34 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753003AbcEDWLb convert rfc822-to-quoted-printable (ORCPT ); Wed, 4 May 2016 18:11:31 -0400 Received: from cloud.peff.net ([50.56.180.127]:34308 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751132AbcEDWLa (ORCPT ); Wed, 4 May 2016 18:11:30 -0400 Received: (qmail 7819 invoked by uid 102); 4 May 2016 22:11:30 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.84) with SMTP; Wed, 04 May 2016 18:11:30 -0400 Received: (qmail 14748 invoked by uid 107); 4 May 2016 22:11:42 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.84) with SMTP; Wed, 04 May 2016 18:11:42 -0400 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Wed, 04 May 2016 18:11:27 -0400 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Wed, May 04, 2016 at 11:54:52PM +0200, =C3=86var Arnfj=C3=B6r=C3=B0 = Bjarmason wrote: > > my @files =3D map { chomp; $_ } `git ls-files`; >=20 > As a minor sidenote you can equivalently write that as: >=20 > chomp(my @files =3D `git ls-files`); >=20 > I.e. chomp itself when given a list will chomp each item of the list. > So no need for a map. Right, thanks, that is more readable. I use the map form reflexively because I am often doing stuff like: my @list =3D do { open(my $fh, '<', $fn); map { chomp; $_ } }; (or replacing "do" with an actual function which is returning a grotesque pipeline of grep/map, etc). -Peff