Git development
 help / color / mirror / Atom feed
* [PATCH 1/2] cvsexportcommit: chomp only removes trailing whitespace
@ 2008-05-14 14:27 Johannes Schindelin
  2008-05-14 14:29 ` [PATCH 2/2] cvsexportcommit: introduce -W for shared working trees (between Git and CVS) Johannes Schindelin
  2008-05-14 17:58 ` [PATCH 1/2] cvsexportcommit: chomp only removes trailing whitespace Junio C Hamano
  0 siblings, 2 replies; 9+ messages in thread
From: Johannes Schindelin @ 2008-05-14 14:27 UTC (permalink / raw)
  To: Robin Rosenberg, git


In commit fef3a7cc(cvsexportcommit: be graceful when "cvs status"
reorders the arguments), caution was taken to get the status even
for files with leading or trailing whitespace.

However, the author of that commit missed that chomp() removes only
trailing whitespace.  But the author realized his mistake.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---

	Really my fault.

 git-cvsexportcommit.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl
index b6036bd..3b20bd1 100755
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
@@ -211,6 +211,7 @@ if (@canstatusfiles) {
 
 	$basename = "no file " . $basename if (exists($added{$basename}));
 	chomp($basename);
+	$basename =~ s/^\s+//;
 
 	if (!exists($fullname{$basename})) {
 	  $fullname{$basename} = $name;
-- 
1.5.5.1.375.g1becb

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-05-15  3:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-14 14:27 [PATCH 1/2] cvsexportcommit: chomp only removes trailing whitespace Johannes Schindelin
2008-05-14 14:29 ` [PATCH 2/2] cvsexportcommit: introduce -W for shared working trees (between Git and CVS) Johannes Schindelin
2008-05-14 17:58 ` [PATCH 1/2] cvsexportcommit: chomp only removes trailing whitespace Junio C Hamano
2008-05-14 18:38   ` Johannes Schindelin
2008-05-14 20:06     ` Robin Rosenberg
2008-05-14 22:15       ` Johannes Schindelin
2008-05-14 22:30     ` [PATCH 1/2 v2] " Johannes Schindelin
2008-05-15  2:27       ` Junio C Hamano
2008-05-15  3:21         ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox