summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-08-12 20:09:41 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-08-12 20:09:41 +0000
commit6b1a4d416f46a03b685b330c7f7084e1bb451a80 (patch)
tree40b552f00fd44a932c12597d011ca31a98355180 /usr.bin/cvs
parent3d6ab2067921264842d7085f97d5358b4f934f9a (diff)
Don't attempt to send the `Root' request if the operation is an `init'
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/proto.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/cvs/proto.c b/usr.bin/cvs/proto.c
index b6cc41cdc7d..f31a0035760 100644
--- a/usr.bin/cvs/proto.c
+++ b/usr.bin/cvs/proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proto.c,v 1.21 2004/08/12 18:35:18 jfb Exp $ */
+/* $OpenBSD: proto.c,v 1.22 2004/08/12 20:09:40 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -329,8 +329,9 @@ cvs_connect(struct cvsroot *root)
if (cvs_trace)
cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-t");
- /* now send the CVSROOT to the server */
- if (cvs_sendreq(root, CVS_REQ_ROOT, root->cr_dir) < 0)
+ /* now send the CVSROOT to the server unless it's an init */
+ if ((cvs_cmdop != CVS_OP_INIT) &&
+ (cvs_sendreq(root, CVS_REQ_ROOT, root->cr_dir) < 0))
return (-1);
/* not sure why, but we have to send this */