From: Johannes Schindelin Date: Thu, 15 May 2008 03:21:09 GMT Subject: Re: [PATCH 1/2 v2] cvsexportcommit: chomp only removes trailing whitespace Message-ID: In-Reply-To: <7vk5hwi9o4.fsf@gitster.siamese.dyndns.org> Hi, On Wed, 14 May 2008, Junio C Hamano wrote: > Johannes Schindelin writes: > > > @@ -210,7 +210,7 @@ if (@canstatusfiles) { > > my $basename = basename($name); > > > > $basename = "no file " . $basename if (exists($added{$basename})); > > - chomp($basename); > > + $basename =~ s/^\s+(.*?)\s*$/$1/; > > Isn't this no-op for a basename that does not begin with a whitespace? > Don't you want to still strip trailing whitespaces in such a case? D'oh. Time for bed. Ciao, Dscho