Re: [PATCH 1/2] git-svn: don't append extra newlines at the end of commit messages.
- From
Andreas Ericsson <ae@op5.se>
- Date
- Jun 13, 2008, 07:23 UTC
- Message-ID
- <48522055.6060006@op5.se>
- In-Reply-To
- <1213312251-8081-1-git-send-email-apenwarr@gmail.com>
Avery Pennarun wrote:
Show 13 quoted lines
> 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. >
I'm not familiar with git-svn, and my perl is pretty weak as it is. Are you proposing to remove extra whitespace from git commits when they are sent back to svn via dcommit? If so, wouldn't it be better to always strip extra newlines when importing from svn so they're never there in the first place?
-- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231