summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4b172de)
raw | patch | inline | side by side (parent: 4b172de)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Wed, 14 May 2008 22:30:43 +0000 (23:30 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 15 May 2008 22:19:04 +0000 (15:19 -0700) |
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 newlines. With help of the mailing list, the author realized
his mistake and provided this patch.
The idea is that we do not want to rely on a certain layout of the
output of "cvs status". Therefore we only call it with files that are
unambiguous after stripping leading and trailing whitespace.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 newlines. With help of the mailing list, the author realized
his mistake and provided this patch.
The idea is that we do not want to rely on a certain layout of the
output of "cvs status". Therefore we only call it with files that are
unambiguous after stripping leading and trailing whitespace.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-cvsexportcommit.perl | patch | blob | history |
index b6036bd4d305215b4a70b6fd0fe54d7607dbe068..317a890271d50dd97963287ece99476446ce33b7 100755 (executable)
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
my $basename = basename($name);
$basename = "no file " . $basename if (exists($added{$basename}));
- chomp($basename);
+ $basename =~ s/^\s+//;
+ $basename =~ s/\s+$//;
if (!exists($fullname{$basename})) {
$fullname{$basename} = $name;