diff options
author | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-01-31 10:15:06 +0000 |
---|---|---|
committer | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-01-31 10:15:06 +0000 |
commit | c9627e39af420c1876b74e97d6e0d257395aaed1 (patch) | |
tree | 139b27acc652675035297a52ae05ea9fe1b4d5f8 /usr.bin/cvs/getlog.c | |
parent | 0548783dd32716f5c917173e44b9dd2e9ea6cd56 (diff) |
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/getlog.c')
-rw-r--r-- | usr.bin/cvs/getlog.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/cvs/getlog.c b/usr.bin/cvs/getlog.c index 0e4d17c8ad3..77ab794e172 100644 --- a/usr.bin/cvs/getlog.c +++ b/usr.bin/cvs/getlog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getlog.c,v 1.80 2008/01/12 22:39:32 tobias Exp $ */ +/* $OpenBSD: getlog.c,v 1.81 2008/01/31 10:15:05 tobias Exp $ */ /* * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> * Copyright (c) 2006 Joris Vink <joris@openbsd.org> @@ -40,7 +40,7 @@ char *slist = NULL; char *wlist = NULL; struct cvs_cmd cvs_cmd_log = { - CVS_OP_LOG, 0, "log", + CVS_OP_LOG, CVS_USE_WDIR, "log", { "lo" }, "Print out history information for files", "[-bhlNRt] [-d dates] [-r revisions] [-s states] [-w logins]", @@ -106,6 +106,8 @@ cvs_getlog(int argc, char **argv) argv += optind; if (cvs_cmdop == CVS_OP_RLOG) { + flags |= CR_REPO; + if (argc == 0) return 0; |