diff options
author | Felix Hanley <felix@seconddrawer.com.au> | 2010-11-09 03:41:13 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-11-09 03:41:13 (JST) |
commit | e0c6f23789e4893781bcd5af2281d468991ccf3a (patch) | |
tree | 1cffe4d35b6404dd59cd0f0a314e11944e37d0f2 /scan-tree.c | |
parent | 49d09d4fd1b0cab8189cf1809a1b1241f54c2e48 (diff) | |
download | cgit-e0c6f23789e4893781bcd5af2281d468991ccf3a.zip cgit-e0c6f23789e4893781bcd5af2281d468991ccf3a.tar.gz |
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 <felix@seconddrawer.com.au>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'scan-tree.c')
-rw-r--r-- | scan-tree.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) | |||
81 | path, strerror(errno), errno); | 81 | path, strerror(errno), errno); |
82 | return; | 82 | return; |
83 | } | 83 | } |
84 | |||
85 | if (ctx.cfg.strict_export && stat(fmt("%s/%s", path, ctx.cfg.strict_export), &st)) | ||
86 | return; | ||
87 | |||
84 | if (!stat(fmt("%s/noweb", path), &st)) | 88 | if (!stat(fmt("%s/noweb", path), &st)) |
85 | return; | 89 | return; |
86 | 90 | ||