From 1bf6edad333c1a78d1246ba670c840df75d1c082 Mon Sep 17 00:00:00 2001 From: jfb Date: Wed, 8 Dec 2004 17:22:48 +0000 Subject: embrace and extend (!) cvs_logmsg_get() so we can now display information based on its availability and have separate sections for the Added, Modified and Removed file lists. this will allow us to use the same call for add, commit, import and possibly others Original patch by Joris Vink, some rework from me for the other sections --- usr.bin/cvs/commit.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'usr.bin/cvs/commit.c') diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index 3e45dfc6d05..1528ddde12f 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.9 2004/12/07 17:10:56 tedu Exp $ */ +/* $OpenBSD: commit.c,v 1.10 2004/12/08 17:22:48 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -56,33 +56,33 @@ int cvs_commit_file (CVSFILE *, void *); int cvs_commit(int argc, char **argv) { - int i, ch, recurse, flags; + int i, ch, flags; char *msg, *mfile; struct cvs_flist cl; struct cvsroot *root; flags = CF_RECURSE|CF_IGNORE|CF_SORT; - recurse = 1; mfile = NULL; msg = NULL; TAILQ_INIT(&cl); - while ((ch = getopt(argc, argv, "F:flm:R")) != -1) { + while ((ch = getopt(argc, argv, "F:flm:Rr:")) != -1) { switch (ch) { case 'F': mfile = optarg; break; case 'f': - recurse = 0; + /* XXX half-implemented */ + flags &= ~CF_RECURSE; break; case 'l': - recurse = 0; + flags &= ~CF_RECURSE; break; case 'm': msg = optarg; break; case 'R': - recurse = 1; + flags |= CF_RECURSE; break; default: return (EX_USAGE); @@ -111,7 +111,7 @@ cvs_commit(int argc, char **argv) cvs_file_examine(cvs_files, cvs_commit_prepare, &cl); if (msg == NULL) { - msg = cvs_logmsg_get(CVS_FILE_NAME(cvs_files), &cl); + msg = cvs_logmsg_get(CVS_FILE_NAME(cvs_files), NULL, &cl, NULL); if (msg == NULL) return (1); } -- cgit v1.2.3-59-g8ed1b