summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/status.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2006-05-27 15:14:28 +0000
committerJoris Vink <joris@cvs.openbsd.org>2006-05-27 15:14:28 +0000
commitd860a2dff9e1047c5a25a0814519187895502814 (patch)
tree78a6e72fc165428e8319793e4fd9a26c2c0c5693 /usr.bin/cvs/status.c
parent2e00d298c34bcede7950f4cc2e5c7ea7e2a4b416 (diff)
allow commands to respect the -l flag, if the -l flag is
specified certain commands will not recurse into directories. at the same time introduce a method of specifying wether or not a command should look in the repository for files.
Diffstat (limited to 'usr.bin/cvs/status.c')
-rw-r--r--usr.bin/cvs/status.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/cvs/status.c b/usr.bin/cvs/status.c
index 57901f34b25..955f663fbc7 100644
--- a/usr.bin/cvs/status.c
+++ b/usr.bin/cvs/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.57 2006/05/27 03:30:31 joris Exp $ */
+/* $OpenBSD: status.c,v 1.58 2006/05/27 15:14:27 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -55,13 +55,16 @@ const char *status_tab[] = {
int
cvs_status(int argc, char **argv)
{
- int ch;
+ int ch, flags;
char *arg = ".";
struct cvs_recursion cr;
+ flags = CR_REPO | CR_RECURSE_DIRS;
+
while ((ch = getopt(argc, argv, cvs_cmd_status.cmd_opts)) != -1) {
switch (ch) {
case 'l':
+ flags &= ~CR_RECURSE_DIRS;
break;
case 'R':
break;
@@ -79,6 +82,7 @@ cvs_status(int argc, char **argv)
cr.leavedir = NULL;
cr.local = cvs_status_local;
cr.remote = NULL;
+ cr.flags = flags;
if (argc > 0)
cvs_file_run(argc, argv, &cr);