Diff options
Diffstat (limited to 'source/cgit.c')
| -rw-r--r-- | source/cgit.c | 15 |
1 file changed, 3 insertions, 12 deletions
diff --git a/source/cgit.c b/source/cgit.c index 11aef92..fd2a17a 100644 --- a/source/cgit.c +++ b/source/cgit.c @@ -384,10 +384,7 @@ static int generate_cached_repolist(const char *path, const char *cached_rc) goto out; } first = cgit_repolist.count; - if (ctx.cfg.project_list) - scan_projects(path, ctx.cfg.project_list); - else - scan_tree(path); + scan_tree(path); print_repolist(f, &cgit_repolist, first); // Flushed before the rename, because print_repolist writes through // stdio and a rename of the file would otherwise publish a repolist @@ -434,12 +431,8 @@ static void process_cached_repolist(const char *path) if (stat(cached_rc.buf, &st)) { // Nothing is cached yet, so this request scans in its own // process, leaving no copy behind when it cannot take the lock. - if (generate_cached_repolist(path, cached_rc.buf)) { - if (ctx.cfg.project_list) - scan_projects(path, ctx.cfg.project_list); - else - scan_tree(path); - } + if (generate_cached_repolist(path, cached_rc.buf)) + scan_tree(path); goto out; } @@ -634,8 +627,6 @@ static void apply_config(const char *name, const char *value) else if (!strcmp(name, "scan-path")) { if (ctx.cfg.cache_size) process_cached_repolist(cgit_expand_macros(value)); - else if (ctx.cfg.project_list) - scan_projects(cgit_expand_macros(value), ctx.cfg.project_list); else scan_tree(cgit_expand_macros(value)); // The scan grows the repository array, so a record taken before |
