=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/update.c,v retrieving revision 1.30 retrieving revision 1.31 diff -c -r1.30 -r1.31 *** src/usr.bin/cvs/update.c 2005/05/24 04:21:54 1.30 --- src/usr.bin/cvs/update.c 2005/05/26 03:07:20 1.31 *************** *** 1,4 **** ! /* $OpenBSD: update.c,v 1.30 2005/05/24 04:21:54 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: update.c,v 1.31 2005/05/26 03:07:20 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 64,77 **** CVS_CMD_ALLOWSPEC | CVS_CMD_SENDARGS2 | CVS_CMD_SENDDIR }; ! static int Pflag, dflag, Aflag; static int cvs_update_init(struct cvs_cmd *cmd, int argc, char **argv, int *arg) { int ch; ! Pflag = dflag = Aflag = 0; while ((ch = getopt(argc, argv, cmd->cmd_opts)) != -1) { switch (ch) { --- 64,77 ---- CVS_CMD_ALLOWSPEC | CVS_CMD_SENDARGS2 | CVS_CMD_SENDDIR }; ! static int dflag, Aflag; static int cvs_update_init(struct cvs_cmd *cmd, int argc, char **argv, int *arg) { int ch; ! dflag = Aflag = 0; while ((ch = getopt(argc, argv, cmd->cmd_opts)) != -1) { switch (ch) { *************** *** 89,95 **** cmd->file_flags &= ~CF_RECURSE; break; case 'P': ! Pflag = 1; break; case 'p': cvs_noexec = 1; /* no locks will be created */ --- 89,95 ---- cmd->file_flags &= ~CF_RECURSE; break; case 'P': ! cmd->cmd_flags |= CVS_CMD_PRUNEDIRS; break; case 'p': cvs_noexec = 1; /* no locks will be created */ *************** *** 114,120 **** static int cvs_update_pre_exec(struct cvsroot *root) { ! if (Pflag && cvs_sendarg(root, "-P", 0) < 0) return (CVS_EX_PROTO); if (Aflag && cvs_sendarg(root, "-A", 0) < 0) return (CVS_EX_PROTO); --- 114,121 ---- static int cvs_update_pre_exec(struct cvsroot *root) { ! if ((cvs_cmd_update.cmd_flags & CVS_CMD_PRUNEDIRS) && ! (cvs_sendarg(root, "-P", 0) < 0)) return (CVS_EX_PROTO); if (Aflag && cvs_sendarg(root, "-A", 0) < 0) return (CVS_EX_PROTO);