opnsense-ports/devel/cvs-devel/files/patch-newlines_in_commit_template
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

32 lines
871 B
Text

# Change commit template so that there are two newlines at the
# beginning. (closes: #102624)
#
# Patch from Tollef Fog Heen <tfheen@debian.org>
diff -Nur src/logmsg.c src/logmsg.c
--- src/logmsg.c 2005-09-04 08:27:44.000000000 +0800
+++ src/logmsg.c 2006-02-26 17:57:28.000000000 +0800
@@ -264,6 +264,11 @@
}
}
+ if (!*messagep)
+ {
+ (void) fprintf (fp, "\n");
+ }
+
(void) fprintf (fp,
"%s----------------------------------------------------------------------\n",
CVSEDITPREFIX);
@@ -349,7 +354,11 @@
*messagep = NULL;
}
- if (pre_stbuf.st_mtime == post_stbuf.st_mtime || *messagep == NULL)
+ if (pre_stbuf.st_mtime == post_stbuf.st_mtime ||
+ *messagep == NULL ||
+ (*messagep)[0] == '\0' ||
+ strcmp (*messagep, "\n") == 0 ||
+ strcmp (*messagep, "\n\n") == 0)
{
for (;;)
{