=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/update.c,v retrieving revision 1.157 retrieving revision 1.158 diff -c -r1.157 -r1.158 *** src/usr.bin/cvs/update.c 2009/02/21 14:50:53 1.157 --- src/usr.bin/cvs/update.c 2009/03/21 11:16:28 1.158 *************** *** 1,4 **** ! /* $OpenBSD: update.c,v 1.157 2009/02/21 14:50:53 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * --- 1,4 ---- ! /* $OpenBSD: update.c,v 1.158 2009/03/21 11:16:28 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * *************** *** 246,251 **** --- 246,257 ---- if (cvs_server_active == 1 && !strcmp(cf->file_name, ".")) return; + entlist = cvs_ent_open(cf->file_path); + if (!TAILQ_EMPTY(&(entlist->cef_ent))) { + isempty = 0; + goto prune_it; + } + if (fstat(cf->fd, &st) == -1) fatal("cvs_update_leavedir: %s", strerror(errno)); *************** *** 276,288 **** continue; } ! if (!strcmp(dp->d_name, CVS_PATH_CVSDIR)) { ! entlist = cvs_ent_open(cf->file_path); ! if (!TAILQ_EMPTY(&(entlist->cef_ent))) ! isempty = 0; ! } else { isempty = 0; - } if (isempty == 0) break; --- 282,289 ---- continue; } ! if (strcmp(dp->d_name, CVS_PATH_CVSDIR)) isempty = 0; if (isempty == 0) break; *************** *** 296,301 **** --- 297,303 ---- xfree(buf); + prune_it: if ((isempty == 1 && prune_dirs == 1) || (cvs_server_active == 1 && cvs_cmdop == CVS_OP_CHECKOUT)) { /* XXX */