summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/edit.c
diff options
context:
space:
mode:
authortobias <tobias@openbsd.org>2008-01-31 10:15:05 +0000
committertobias <tobias@openbsd.org>2008-01-31 10:15:05 +0000
commitf331ff59831f242d2460f823c6dba145a2176394 (patch)
tree29af71290535d1e18c0557d32d48f188f26af532 /usr.bin/cvs/edit.c
parentadd prefixes to names of structure elements to make it easier to grep (diff)
downloadwireguard-openbsd-f331ff59831f242d2460f823c6dba145a2176394.tar.xz
wireguard-openbsd-f331ff59831f242d2460f823c6dba145a2176394.zip
Replaced the unused cvs_command variable cmd_req with cmd_flags, which states
if the current command is supposed to use a working directory or if it is a repository-only command (as of now checkout -p, rtag, rlog). Makes the code simpler, easier to read and automagically fixes some issues we encountered with these commands (for example if a working directory exists, or "." operations are performed). OK joris@, niallo@
Diffstat (limited to 'usr.bin/cvs/edit.c')
-rw-r--r--usr.bin/cvs/edit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/cvs/edit.c b/usr.bin/cvs/edit.c
index 2eff2d8af25..209f9170041 100644
--- a/usr.bin/cvs/edit.c
+++ b/usr.bin/cvs/edit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: edit.c,v 1.41 2008/01/28 20:31:07 tobias Exp $ */
+/* $OpenBSD: edit.c,v 1.42 2008/01/31 10:15:05 tobias Exp $ */
/*
* Copyright (c) 2006, 2007 Xavier Santolaria <xsa@openbsd.org>
*
@@ -42,7 +42,7 @@ static RCSNUM *cvs_base_handle(struct cvs_file *, int);
static int edit_aflags = 0;
struct cvs_cmd cvs_cmd_edit = {
- CVS_OP_EDIT, 0, "edit",
+ CVS_OP_EDIT, CVS_USE_WDIR, "edit",
{ },
"Get ready to edit a watched file",
"[-lR] [-a action] [file ...]",
@@ -52,7 +52,7 @@ struct cvs_cmd cvs_cmd_edit = {
};
struct cvs_cmd cvs_cmd_editors = {
- CVS_OP_EDITORS, 0, "editors",
+ CVS_OP_EDITORS, CVS_USE_WDIR, "editors",
{ },
"See who is editing a watched file",
"[-lR] [file ...]",
@@ -62,7 +62,7 @@ struct cvs_cmd cvs_cmd_editors = {
};
struct cvs_cmd cvs_cmd_unedit = {
- CVS_OP_UNEDIT, 0, "unedit",
+ CVS_OP_UNEDIT, CVS_USE_WDIR, "unedit",
{ },
"Undo an edit command",
"[-lR] [file ...]",