summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2008-02-04 21:25:33 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2008-02-04 21:25:33 +0000
commit1deec3aaeda776755b56b0c154246c207dcbccf7 (patch)
treec53f224bbad7dd56378384ec57439523a93bb178
parent89118e40225edb523941e9659909070911434097 (diff)
r* commands have their own usage; don't check usage of their working dir
equivalents. OK joris@, xsa@
-rw-r--r--usr.bin/cvs/annotate.c5
-rw-r--r--usr.bin/cvs/diff.c8
-rw-r--r--usr.bin/cvs/getlog.c5
-rw-r--r--usr.bin/cvs/tag.c5
4 files changed, 13 insertions, 10 deletions
diff --git a/usr.bin/cvs/annotate.c b/usr.bin/cvs/annotate.c
index d6a3312aed3..32efd059a47 100644
--- a/usr.bin/cvs/annotate.c
+++ b/usr.bin/cvs/annotate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: annotate.c,v 1.51 2008/02/04 19:12:31 joris Exp $ */
+/* $OpenBSD: annotate.c,v 1.52 2008/02/04 21:25:32 tobias Exp $ */
/*
* Copyright (c) 2007 Tobias Stoeckmann <tobias@openbsd.org>
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -63,7 +63,8 @@ cvs_annotate(int argc, char **argv)
flags = CR_RECURSE_DIRS;
- while ((ch = getopt(argc, argv, cvs_cmd_annotate.cmd_opts)) != -1) {
+ while ((ch = getopt(argc, argv, cvs_cmdop == CVS_OP_ANNOTATE ?
+ cvs_cmd_annotate.cmd_opts : cvs_cmd_rannotate.cmd_opts)) != -1) {
switch (ch) {
case 'D':
break;
diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c
index 97bb3066192..bc476e14066 100644
--- a/usr.bin/cvs/diff.c
+++ b/usr.bin/cvs/diff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff.c,v 1.126 2008/02/04 15:07:33 tobias Exp $ */
+/* $OpenBSD: diff.c,v 1.127 2008/02/04 21:25:32 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -60,15 +60,15 @@ struct cvs_cmd cvs_cmd_rdiff = {
int
cvs_diff(int argc, char **argv)
{
- int ch;
+ int ch, flags;
char *arg = ".";
- int flags;
struct cvs_recursion cr;
flags = CR_RECURSE_DIRS;
strlcpy(diffargs, argv[0], sizeof(diffargs));
- while ((ch = getopt(argc, argv, cvs_cmd_diff.cmd_opts)) != -1) {
+ while ((ch = getopt(argc, argv, cvs_cmdop == CVS_OP_DIFF ?
+ cvs_cmd_diff.cmd_opts : cvs_cmd_rdiff.cmd_opts)) != -1) {
switch (ch) {
case 'c':
strlcat(diffargs, " -c", sizeof(diffargs));
diff --git a/usr.bin/cvs/getlog.c b/usr.bin/cvs/getlog.c
index a96b5e1df63..3a55d986c10 100644
--- a/usr.bin/cvs/getlog.c
+++ b/usr.bin/cvs/getlog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getlog.c,v 1.83 2008/01/31 22:09:05 xsa Exp $ */
+/* $OpenBSD: getlog.c,v 1.84 2008/02/04 21:25:32 tobias Exp $ */
/*
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
@@ -69,7 +69,8 @@ cvs_getlog(int argc, char **argv)
rcsnum_flags |= RCSNUM_NO_MAGIC;
flags = CR_RECURSE_DIRS;
- while ((ch = getopt(argc, argv, cvs_cmd_log.cmd_opts)) != -1) {
+ while ((ch = getopt(argc, argv, cvs_cmdop == CVS_OP_LOG ?
+ cvs_cmd_log.cmd_opts : cvs_cmd_rlog.cmd_opts)) != -1) {
switch (ch) {
case 'h':
runflags |= L_HEAD;
diff --git a/usr.bin/cvs/tag.c b/usr.bin/cvs/tag.c
index 9b563657b53..1549c236c8f 100644
--- a/usr.bin/cvs/tag.c
+++ b/usr.bin/cvs/tag.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tag.c,v 1.64 2008/01/31 22:09:05 xsa Exp $ */
+/* $OpenBSD: tag.c,v 1.65 2008/02/04 21:25:32 tobias Exp $ */
/*
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
*
@@ -67,7 +67,8 @@ cvs_tag(int argc, char **argv)
flags = CR_RECURSE_DIRS;
- while ((ch = getopt(argc, argv, cvs_cmd_tag.cmd_opts)) != -1) {
+ while ((ch = getopt(argc, argv, cvs_cmdop == CVS_OP_TAG ?
+ cvs_cmd_tag.cmd_opts : cvs_cmd_rtag.cmd_opts)) != -1) {
switch (ch) {
case 'b':
runflags |= T_BRANCH;