summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoris <joris@openbsd.org>2008-06-10 03:55:50 +0000
committerjoris <joris@openbsd.org>2008-06-10 03:55:50 +0000
commit6697560e560dd8edc409be68f00a4d272187888d (patch)
tree3332b997f04b1119e855dfeb67a6d24cded431dc
parentFor IPv6 addresses, return the first 32 bits of the MD5 hash of the (diff)
downloadwireguard-openbsd-6697560e560dd8edc409be68f00a4d272187888d.tar.xz
wireguard-openbsd-6697560e560dd8edc409be68f00a4d272187888d.zip
newly added directories need "- New directory" to be passed to the
loginfo script. ok tobias@
-rw-r--r--usr.bin/cvs/trigger.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/usr.bin/cvs/trigger.c b/usr.bin/cvs/trigger.c
index 24c09c10511..a45e8ac7d86 100644
--- a/usr.bin/cvs/trigger.c
+++ b/usr.bin/cvs/trigger.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trigger.c,v 1.6 2008/06/10 03:33:21 joris Exp $ */
+/* $OpenBSD: trigger.c,v 1.7 2008/06/10 03:55:50 joris Exp $ */
/*
* Copyright (c) 2008 Tobias Stoeckmann <tobias@openbsd.org>
* Copyright (c) 2008 Jonathan Armani <dbd@asystant.net>
@@ -78,6 +78,17 @@ expand_args(BUF *buf, struct file_info_list *file_info, const char *repo,
if (*format == '\0')
return 0;
+ /*
+ * check like this, add only uses loginfo for directories anyway
+ */
+ if (cvs_cmdop == CVS_OP_ADD) {
+ cvs_buf_append(buf, "- New directory",
+ strlen("- New directory"));
+ if (quote)
+ cvs_buf_putc(buf, '"');
+ return (0);
+ }
+
for (;;) {
for (p = format; *p != '\0';) {
val = NULL;
@@ -119,7 +130,8 @@ expand_args(BUF *buf, struct file_info_list *file_info, const char *repo,
break;
case 'V':
if (fi != NULL) {
- if (!strcmp(fi->crevstr,
+ if (fi->crevstr != NULL &&
+ !strcmp(fi->crevstr,
"Non-existent"))
val = "NONE";
else