diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2006-05-27 15:14:28 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2006-05-27 15:14:28 +0000 |
commit | d860a2dff9e1047c5a25a0814519187895502814 (patch) | |
tree | 78a6e72fc165428e8319793e4fd9a26c2c0c5693 /usr.bin/cvs/commit.c | |
parent | 2e00d298c34bcede7950f4cc2e5c7ea7e2a4b416 (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/commit.c')
-rw-r--r-- | usr.bin/cvs/commit.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index 524c7babee9..f8a2020b167 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.57 2006/05/27 14:05:53 joris Exp $ */ +/* $OpenBSD: commit.c,v 1.58 2006/05/27 15:14:27 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -47,8 +47,11 @@ cvs_commit(int argc, char **argv) { int ch; char *arg = "."; + int flags; struct cvs_recursion cr; + flags = CR_RECURSE_DIRS; + while ((ch = getopt(argc, argv, cvs_cmd_commit.cmd_opts)) != -1) { switch (ch) { case 'f': @@ -56,6 +59,7 @@ cvs_commit(int argc, char **argv) case 'F': break; case 'l': + flags &= ~CR_RECURSE_DIRS; break; case 'm': logmsg = xstrdup(optarg); @@ -82,6 +86,7 @@ cvs_commit(int argc, char **argv) cr.leavedir = NULL; cr.local = cvs_commit_check_conflicts; cr.remote = NULL; + cr.flags = flags; if (argc > 0) cvs_file_run(argc, argv, &cr); |