git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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?

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 8 of 9 in “cvsexportcommit: chomp only removes trailing whitespace”
  1. 1/2 cvsexportcommit: chomp only removes trailing whitespaceJohannes Schindelin, May 14, 2008
  2. 2/2 cvsexportcommit: introduce -W for shared working trees (between Git and CVS)Johannes Schindelin, May 14, 2008
  3. Junio C HamanoMay 14, 2008
  4. Johannes SchindelinMay 14, 2008
  5. Robin RosenbergMay 14, 2008
  6. Johannes SchindelinMay 14, 2008
  7. 1/2 cvsexportcommit: chomp only removes trailing whitespaceJohannes Schindelin, May 14, 2008
  8. Junio C HamanoMay 15, 2008
  9. Johannes SchindelinMay 15, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.