]> git.ipfire.org Git - thirdparty/git.git/commit - git-svn.perl
git-svn: don't append extra newlines at the end of commit messages.
authorAvery Pennarun <apenwarr@gmail.com>
Thu, 12 Jun 2008 23:10:50 +0000 (19:10 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sat, 14 Jun 2008 18:47:55 +0000 (11:47 -0700)
commit328eb9b32f7babfb182bad8655491aa6265e96eb
treecd93107593add40da0efd94b9ab72910468811d4
parent8e7e6f39b6895b6623dc0f6053818704899f41a6
git-svn: don't append extra newlines at the end of commit messages.

In git, all commits end in exactly one newline character.  In svn, commits
end in zero or more newlines.  Thus, when importing commits from svn into
git, git-svn always appends two extra newlines to ensure that the
git-svn-id: line is separated from the main commit message by at least one
blank line.

Combined with the terminating newline that's always present in svn commits
produced by git, you usually end up with two blank lines instead of one
between the commit message and git-svn-id: line, which is undesirable.

Instead, let's remove all trailing whitespace from the git commit on the way
through to svn.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-svn.perl