aboutsummaryrefslogtreecommitdiffstats
path: root/scan-tree.c
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2010-09-19 18:43:58 +0200
committerLars Hjemli <hjemli@gmail.com>2010-09-19 18:43:58 +0200
commite76a1ea427792aaa331cdec70d7d4ff1fb3422e0 (patch)
treefaeee0c46a2d470b29b46481f74070557e3fdb8d /scan-tree.c
parentUse GIT-1.7.3 (diff)
parentAdd support for "readme" option (diff)
downloadcgit-e76a1ea427792aaa331cdec70d7d4ff1fb3422e0.tar.xz
cgit-e76a1ea427792aaa331cdec70d7d4ff1fb3422e0.zip
Merge branch 'lh/readme'
Diffstat (limited to 'scan-tree.c')
-rw-r--r--scan-tree.c8
1 files changed, 5 insertions, 3 deletions
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)) {