diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-06-10 03:55:51 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-06-10 03:55:51 +0000 |
commit | 3251e557452a789c02205b213ceb43ea52433e49 (patch) | |
tree | 96de62588c9be799e4bdeec3930d4bb0dbb1710f /usr.bin | |
parent | 7b97c806c9204d0dcddc4c0483e909fe16d513ce (diff) |
newly added directories need "- New directory" to be passed to the
loginfo script.
ok tobias@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/trigger.c | 16 |
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 |