diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2007-01-07 02:47:58 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2007-01-07 02:47:58 +0000 |
commit | 125044b0d0b25a5acf48af8a4c32b41aba93de46 (patch) | |
tree | 2ab4f5e96bbd9e69dff152b910191fdad2e08114 | |
parent | fecbbc69bad19546214903fdee75458defe4f592 (diff) |
and lets make import work with the new logmsg code too!
-rw-r--r-- | usr.bin/cvs/import.c | 7 | ||||
-rw-r--r-- | usr.bin/cvs/logmsg.c | 8 |
2 files changed, 9 insertions, 6 deletions
diff --git a/usr.bin/cvs/import.c b/usr.bin/cvs/import.c index 81b5eb0abd9..766f5782717 100644 --- a/usr.bin/cvs/import.c +++ b/usr.bin/cvs/import.c @@ -1,4 +1,4 @@ -/* $OpenBSD: import.c,v 1.56 2006/12/04 09:51:21 xsa Exp $ */ +/* $OpenBSD: import.c,v 1.57 2007/01/07 02:47:57 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -82,7 +82,10 @@ cvs_import(int argc, char **argv) fatal("%s", cvs_cmd_import.cmd_synopsis); if (logmsg == NULL) - fatal("please specify a logmessage using -m for now"); + logmsg = cvs_logmsg_create(NULL, NULL, NULL); + + if (logmsg == NULL) + fatal("This shouldnt happen, honestly!"); import_repository = argv[0]; vendor_tag = argv[1]; diff --git a/usr.bin/cvs/logmsg.c b/usr.bin/cvs/logmsg.c index cc54e899551..6b02f359eea 100644 --- a/usr.bin/cvs/logmsg.c +++ b/usr.bin/cvs/logmsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: logmsg.c,v 1.30 2007/01/07 02:39:24 joris Exp $ */ +/* $OpenBSD: logmsg.c,v 1.31 2007/01/07 02:47:57 joris Exp $ */ /* * Copyright (c) 2007 Joris Vink <joris@openbsd.org> * @@ -113,7 +113,7 @@ cvs_logmsg_create(struct cvs_flisthead *added, struct cvs_flisthead *removed, "removed automatically\n%s\n", CVS_LOGMSG_PREFIX, CVS_LOGMSG_LINE, CVS_LOGMSG_PREFIX, CVS_LOGMSG_PREFIX, CVS_LOGMSG_PREFIX); - if (!TAILQ_EMPTY(added)) { + if (added != NULL && !TAILQ_EMPTY(added)) { fprintf(fp, "%s Added Files:", CVS_LOGMSG_PREFIX); TAILQ_FOREACH(cf, added, flist) fprintf(fp, "\n%s\t%s", @@ -121,7 +121,7 @@ cvs_logmsg_create(struct cvs_flisthead *added, struct cvs_flisthead *removed, fputs("\n", fp); } - if (!TAILQ_EMPTY(removed)) { + if (removed != NULL && !TAILQ_EMPTY(removed)) { fprintf(fp, "%s Removed Files:", CVS_LOGMSG_PREFIX); TAILQ_FOREACH(cf, removed, flist) fprintf(fp, "\n%s\t%s", @@ -129,7 +129,7 @@ cvs_logmsg_create(struct cvs_flisthead *added, struct cvs_flisthead *removed, fputs("\n", fp); } - if (!TAILQ_EMPTY(modified)) { + if (modified != NULL && !TAILQ_EMPTY(modified)) { fprintf(fp, "%s Modified Files:", CVS_LOGMSG_PREFIX); TAILQ_FOREACH(cf, modified, flist) fprintf(fp, "\n%s\t%s", |