Thread (2 messages) flat view 2 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 1/2] cvsexportcommit: chomp only removes trailing whitespace

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:44:36
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---

	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help