diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2006-05-27 15:14:28 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2006-05-27 15:14:28 +0000 |
commit | d860a2dff9e1047c5a25a0814519187895502814 (patch) | |
tree | 78a6e72fc165428e8319793e4fd9a26c2c0c5693 /usr.bin/cvs/repository.c | |
parent | 2e00d298c34bcede7950f4cc2e5c7ea7e2a4b416 (diff) |
allow commands to respect the -l flag, if the -l flag is
specified certain commands will not recurse into directories.
at the same time introduce a method of specifying wether or not
a command should look in the repository for files.
Diffstat (limited to 'usr.bin/cvs/repository.c')
-rw-r--r-- | usr.bin/cvs/repository.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/cvs/repository.c b/usr.bin/cvs/repository.c index 5bea74ffcb1..be60d2bd3cc 100644 --- a/usr.bin/cvs/repository.c +++ b/usr.bin/cvs/repository.c @@ -1,4 +1,4 @@ -/* $OpenBSD: repository.c,v 1.1 2006/05/27 03:30:31 joris Exp $ */ +/* $OpenBSD: repository.c,v 1.2 2006/05/27 15:14:27 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -89,7 +89,7 @@ cvs_repository_lock(const char *repo) void cvs_repository_getdir(const char *dir, const char *wdir, - struct cvs_flisthead *fl, struct cvs_flisthead *dl) + struct cvs_flisthead *fl, struct cvs_flisthead *dl, int dodirs) { int l; DIR *dirp; @@ -109,6 +109,9 @@ cvs_repository_getdir(const char *dir, const char *wdir, if (cvs_file_chkign(dp->d_name)) continue; + if (dodirs == 0 && dp->d_type == DT_DIR) + continue; + l = snprintf(fpath, sizeof(fpath), "%s/%s", wdir, dp->d_name); if (l == -1 || l >= (int)sizeof(fpath)) fatal("cvs_repository_getdir: overflow"); |