From e0c6f23789e4893781bcd5af2281d468991ccf3a Mon Sep 17 00:00:00 2001 From: Felix Hanley Date: Mon, 8 Nov 2010 19:41:13 +0100 Subject: Add `strict-export` option This option is used to specify a filename which needs to be present in the repositories found during `scan-path` processing. By setting this option to 'git-daemon-export-ok', only repositories explicitly marked for git daemon export will be included in the cgit configuration. Signed-off-by: Felix Hanley Signed-off-by: Lars Hjemli --- scan-tree.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scan-tree.c') diff --git a/scan-tree.c b/scan-tree.c index b5b50f3..a0e09ce 100644 --- a/scan-tree.c +++ b/scan-tree.c @@ -81,6 +81,10 @@ static void add_repo(const char *base, const char *path, repo_config_fn fn) path, strerror(errno), errno); return; } + + if (ctx.cfg.strict_export && stat(fmt("%s/%s", path, ctx.cfg.strict_export), &st)) + return; + if (!stat(fmt("%s/noweb", path), &st)) return; -- cgit v1.2.1