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

[PATCH] svn adds extra blank line to log messages

From: Patrik Rådman <pradman_at_abo.fi>
Date: 2004-03-23 02:14:49 CET

Hi,

If you enter a commit message via $EDITOR, an extra blank line is added at
the end. (An n line message becomes n+1 lines in the DB.)

The patch below fixes this by removing the extra newline character(s).

Index: subversion/clients/cmdline/util.c
===================================================================
--- subversion/clients/cmdline/util.c (revision 9193)
+++ subversion/clients/cmdline/util.c (working copy)
@@ -384,6 +384,11 @@
           || (*(substring - 1) == '\n'))
         {
           *substring = '\0';
+ while ((*(substring - 1) == '\r') || (*(substring - 1) == '\n'))
+ {
+ substring--;
+ *substring = '\0';
+ }
           if (new_len)
             *new_len = substring - buffer;
         }

-- 
Patrik Rådman
patrik at iki dot fi
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 24 17:28:24 2004

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

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