[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Extra newline added to commit messages -- why?

From: Ori Avtalion <ori_at_avtalion.name>
Date: Fri, 16 Apr 2010 01:16:17 +0300

Hi,

After looking at logs for a project, I notice some commits have an empty
line between the commit text and the "------" line, and some don't.

After asking on #svn and doing some tests, I realized that the commits I
saw without the extra newline were either made by "commit -m", git-svn,
or by removing the helper "--This line, and those below, will be
ignored--" text from the commit message file and telling the editor to
not add a newline to the end of a file. (e.g. Can be done using an
autocmd in vim)

Why is that newline added in the first place?

Shouldn't Subversion maintain the appearance of the commit message as it
is in the temp commit message file and ignore the newline between the
message itself and the "--This line" text?

As another example of why I find this illogical, these two processes
should produce the same commit log message, but they don't:

This doesn't add a newline at the end
1) $ svn commit -m "Fixed something"

This does:
2) $ svn commit # then edit:
Fixed something
--This line, and those below, will be ignored--

M a
EOF

What do you think?

-Ori
Received on 2010-04-16 00:16:48 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.