summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/commit.c
diff options
context:
space:
mode:
authorjfb <jfb@openbsd.org>2004-12-08 17:22:48 +0000
committerjfb <jfb@openbsd.org>2004-12-08 17:22:48 +0000
commit1bf6edad333c1a78d1246ba670c840df75d1c082 (patch)
tree2dcaed0a93e1e95cfd6604109d9db80cb1951fdb /usr.bin/cvs/commit.c
parent* knf (diff)
downloadwireguard-openbsd-1bf6edad333c1a78d1246ba670c840df75d1c082.tar.xz
wireguard-openbsd-1bf6edad333c1a78d1246ba670c840df75d1c082.zip
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
Diffstat (limited to 'usr.bin/cvs/commit.c')
-rw-r--r--usr.bin/cvs/commit.c16
1 files changed, 8 insertions, 8 deletions
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 <jfb@openbsd.org>
* 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);
}