summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/commit.c
diff options
context:
space:
mode:
authorjoris <joris@openbsd.org>2005-04-24 02:06:27 +0000
committerjoris <joris@openbsd.org>2005-04-24 02:06:27 +0000
commit38c61fc2f318c928af163078eb45e181fbddc749 (patch)
tree373c33f9c1ba56ea18d04ec7f2cde9c3a7f4f3bd /usr.bin/cvs/commit.c
parentadd missing CVS_CMD_ALLOWSPEC flag (diff)
downloadwireguard-openbsd-38c61fc2f318c928af163078eb45e181fbddc749.tar.xz
wireguard-openbsd-38c61fc2f318c928af163078eb45e181fbddc749.zip
don't send a Modified request and the file its contents when
it has been removed.
Diffstat (limited to 'usr.bin/cvs/commit.c')
-rw-r--r--usr.bin/cvs/commit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c
index 4d656d6f4ee..f6f2cb857f2 100644
--- a/usr.bin/cvs/commit.c
+++ b/usr.bin/cvs/commit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: commit.c,v 1.30 2005/04/24 01:56:36 joris Exp $ */
+/* $OpenBSD: commit.c,v 1.31 2005/04/24 02:06:27 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -196,6 +196,13 @@ cvs_commit_file(CVSFILE *cf, void *arg)
return (CVS_EX_PROTO);
}
+ /* if it's removed, don't bother sending a
+ * Modified request together with the file its
+ * contents.
+ */
+ if (cf->cf_cvstat == CVS_FST_REMOVED)
+ return (0);
+
if (cvs_sendreq(root, CVS_REQ_MODIFIED,
CVS_FILE_NAME(cf)) < 0) {
return (CVS_EX_PROTO);