diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-02-03 22:50:29 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-02-03 22:50:29 +0000 |
commit | 35e0ce366c7fa544c774ac9bb008496383a3746c (patch) | |
tree | 377df7d3de4741e66a75f0c9c0ee0b342cceca07 /usr.bin/cvs/file.c | |
parent | 3632b404f6998f60f7e3c9114c9cef64d325ddab (diff) |
more CVSROOT/module stuff:
- allow more then 1 module to be specified per definition
- respect the "!" sign which means: "hey ignore this dir when checking out"
- non alias definitions can now contain files
ok tobias@
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r-- | usr.bin/cvs/file.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index c9d72fe518c..ae82919f1f6 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.213 2008/02/03 15:08:04 tobias Exp $ */ +/* $OpenBSD: file.c,v 1.214 2008/02/03 22:50:28 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> @@ -78,6 +78,7 @@ static const char *cvs_ign_std[] = { char *cvs_directory_tag = NULL; struct ignore_head cvs_ign_pats; struct ignore_head dir_ign_pats; +struct ignore_head checkout_ign_pats; void cvs_file_init(void) @@ -88,6 +89,7 @@ cvs_file_init(void) TAILQ_INIT(&cvs_ign_pats); TAILQ_INIT(&dir_ign_pats); + TAILQ_INIT(&checkout_ign_pats); /* standard patterns to ignore */ for (i = 0; i < (int)(sizeof(cvs_ign_std)/sizeof(char *)); i++) @@ -167,6 +169,14 @@ cvs_file_chkign(const char *file) return (1); } + TAILQ_FOREACH(ip, &checkout_ign_pats, ip_list) { + if (ip->ip_flags & CVS_IGN_STATIC) { + if (cvs_file_cmpname(file, ip->ip_pat) == 0) + return (1); + } else if (fnmatch(ip->ip_pat, file, flags) == 0) + return (1); + } + return (0); } |