Re: [PATCH 1/2 v2] cvsexportcommit: chomp only removes trailing whitespace
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 15, 2008, 02:27 UTC
- Message-ID
- <7vk5hwi9o4.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.DEB.1.00.0805142327520.30431@racer>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 6 quoted lines
> @@ -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?