From 515edb0da3b9156e07e269621d7474cdea82acaf Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sat, 21 Aug 2010 15:08:01 +0200 Subject: Add support for "readme" option The value of this option is used as the default value for repo.readme. Signed-off-by: Lars Hjemli --- scan-tree.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'scan-tree.c') diff --git a/scan-tree.c b/scan-tree.c index e987824..780d405 100644 --- a/scan-tree.c +++ b/scan-tree.c @@ -110,9 +110,11 @@ static void add_repo(const char *base, const char *path, repo_config_fn fn) if (!stat(p, &st)) readfile(p, &repo->desc, &size); - p = fmt("%s/README.html", path); - if (!stat(p, &st)) - repo->readme = "README.html"; + if (!repo->readme) { + p = fmt("%s/README.html", path); + if (!stat(p, &st)) + repo->readme = "README.html"; + } p = fmt("%s/cgitrc", path); if (!stat(p, &st)) { -- cgit v1.2.3-59-g8ed1b