aboutsummaryrefslogtreecommitdiff
path: root/git-cvsimport-script
diff options
context:
space:
mode:
authorMatthias Urlichs <smurf@kiste.(none)>2005-06-30 22:09:42 +0200
committerMatthias Urlichs <smurf@kiste.(none)>2005-06-30 22:09:42 +0200
commite371046b6473907aa6d62b7862a3afe9d33561e1 (patch)
treeaad6968fdd5ecb05a19fdfa5357d2b6e237334c4 /git-cvsimport-script
parent0fa2824f358febe306861f0cab73d25815372ee4 (diff)
downloadgit-e371046b6473907aa6d62b7862a3afe9d33561e1.tar.gz
git-e371046b6473907aa6d62b7862a3afe9d33561e1.tar.xz
cvs import: Strip whitespace at the end of the log entry
for compatibility with old cvs2git.
Diffstat (limited to 'git-cvsimport-script')
-rwxr-xr-xgit-cvsimport-script7
1 files changed, 6 insertions, 1 deletions
diff --git a/git-cvsimport-script b/git-cvsimport-script
index 8e0e4ac4b..3f157725c 100755
--- a/git-cvsimport-script
+++ b/git-cvsimport-script
@@ -468,7 +468,12 @@ my $commit = sub {
}
$pw->writer();
$pr->reader();
- print $pw $logmsg
+
+ # compatibility with git2cvs
+ substr($logmsg,32767) = "" if length($logmsg) > 32767;
+ $logmsg =~ s/[\s\n]+\z//;
+
+ print $pw "$logmsg\n"
or die "Error writing to git-commit-tree: $!\n";
$pw->close();