diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2006-05-29 06:25:07 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2006-05-29 06:25:07 +0000 |
commit | 6ac44ae1f9a5758350f78fe21d2c9686e3fdeef0 (patch) | |
tree | 3d819f28c22f936d321850d2708034c964bcd49f /usr.bin | |
parent | 0588dc5f98bce1488ae1375d53151c6c03444b00 (diff) |
add needs to be passed arguments on the command line, and
isnt supposed to just run over our parent directory if none are
specified.
found by reyk@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/add.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/cvs/add.c b/usr.bin/cvs/add.c index ea9d88cd359..927536386df 100644 --- a/usr.bin/cvs/add.c +++ b/usr.bin/cvs/add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: add.c,v 1.45 2006/05/28 17:26:12 joris Exp $ */ +/* $OpenBSD: add.c,v 1.46 2006/05/29 06:25:06 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -45,7 +45,6 @@ cvs_add(int argc, char **argv) { int ch; int flags; - char *arg = "."; struct cvs_recursion cr; flags = CR_REPO; @@ -63,17 +62,16 @@ cvs_add(int argc, char **argv) argc -= optind; argv += optind; + if (argc == 0) + fatal("%s", cvs_cmd_add.cmd_synopsis); + cr.enterdir = NULL; cr.leavedir = NULL; cr.local = cvs_add_local; cr.remote = NULL; cr.flags = flags; - if (argc > 0) - cvs_file_run(argc, argv, &cr); - else - cvs_file_run(1, &arg, &cr); - + cvs_file_run(argc, argv, &cr); return (0); } |