diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-02-03 23:34:42 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-02-03 23:34:42 +0000 |
commit | cf0c724bcae32234c945a13b2424c9eb0ae6150a (patch) | |
tree | 3de40e907c13b21b59022e777d0fa363c27bc815 /usr.bin/cvs/modules.c | |
parent | 8fe176d9b0a68ee1d04d9b8a2f3e9ba04b77a23e (diff) |
shuffle some stuff around so we dont end up doing the same things
twice in cvs_module_lookup() and checkout_check_directory();
allow single files to be ignored with ! as well;
Diffstat (limited to 'usr.bin/cvs/modules.c')
-rw-r--r-- | usr.bin/cvs/modules.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/usr.bin/cvs/modules.c b/usr.bin/cvs/modules.c index 9bc2adf47f6..8acdfb82f0e 100644 --- a/usr.bin/cvs/modules.c +++ b/usr.bin/cvs/modules.c @@ -1,4 +1,4 @@ -/* $OpenBSD: modules.c,v 1.5 2008/02/03 22:53:04 joris Exp $ */ +/* $OpenBSD: modules.c,v 1.6 2008/02/03 23:34:41 joris Exp $ */ /* * Copyright (c) 2008 Joris Vink <joris@openbsd.org> * @@ -163,9 +163,6 @@ modules_parse_line(char *line) if (!(mi->mi_flags & MODULE_ALIAS) && TAILQ_EMPTY(&(mi->mi_modules))) cvs_file_get(dirname, 0, &(mi->mi_modules)); - fl = TAILQ_FIRST(&(mi->mi_modules)); - mi->mi_repository = xstrdup(fl->file_path); - TAILQ_INSERT_TAIL(&modules, mi, m_list); } @@ -183,10 +180,7 @@ cvs_module_lookup(char *name) mc->mc_modules = mi->mi_modules; mc->mc_ignores = mi->mi_ignores; mc->mc_canfree = 0; - if (mi->mi_flags & MODULE_ALIAS) - mc->mc_wdir = xstrdup(mi->mi_repository); - else - mc->mc_wdir = xstrdup(mi->mi_name); + mc->mc_name = xstrdup(mi->mi_name); mc->mc_flags = mi->mi_flags; return (mc); } @@ -196,7 +190,7 @@ cvs_module_lookup(char *name) TAILQ_INIT(&(mc->mc_ignores)); cvs_file_get(name, 0, &(mc->mc_modules)); mc->mc_canfree = 1; - mc->mc_wdir = xstrdup(name); + mc->mc_name = xstrdup(name); mc->mc_flags |= MODULE_ALIAS; return (mc); |