From 1bdcbd6059093028cab3b20ece3fab7fdd152621 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 13:22:52 -0700 Subject: Let scan_tree choose the project list itself Three callers wrote out the same choice, and the header already says a scan visits only the listed paths when a project list is set. --- source/scan-tree.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/scan-tree.c') diff --git a/source/scan-tree.c b/source/scan-tree.c index 10f661d..ed50769 100644 --- a/source/scan-tree.c +++ b/source/scan-tree.c @@ -344,7 +344,7 @@ end: closedir(dir); } -void scan_projects(const char *path, const char *projectsfile) +static void scan_projects(const char *path, const char *projectsfile) { struct strbuf line = STRBUF_INIT; FILE *projects; @@ -374,5 +374,8 @@ void scan_projects(const char *path, const char *projectsfile) void scan_tree(const char *path) { - scan_path(path, path); + if (ctx.cfg.project_list) + scan_projects(path, ctx.cfg.project_list); + else + scan_path(path, path); } -- cgit