diff options
author | Lars Hjemli <hjemli@gmail.com> | 2010-08-21 22:08:01 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-08-22 20:35:47 (JST) |
commit | 515edb0da3b9156e07e269621d7474cdea82acaf (patch) | |
tree | e5fed5e83f29166c23216437386e10070e1d258d /scan-tree.c | |
parent | 6d7552bc072599313ef423d69156d824c075572a (diff) | |
download | cgit-515edb0da3b9156e07e269621d7474cdea82acaf.zip cgit-515edb0da3b9156e07e269621d7474cdea82acaf.tar.gz |
Add support for "readme" option
The value of this option is used as the default value for repo.readme.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'scan-tree.c')
-rw-r--r-- | scan-tree.c | 8 |
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) | |||
110 | if (!stat(p, &st)) | 110 | if (!stat(p, &st)) |
111 | readfile(p, &repo->desc, &size); | 111 | readfile(p, &repo->desc, &size); |
112 | 112 | ||
113 | p = fmt("%s/README.html", path); | 113 | if (!repo->readme) { |
114 | if (!stat(p, &st)) | 114 | p = fmt("%s/README.html", path); |
115 | repo->readme = "README.html"; | 115 | if (!stat(p, &st)) |
116 | repo->readme = "README.html"; | ||
117 | } | ||
116 | 118 | ||
117 | p = fmt("%s/cgitrc", path); | 119 | p = fmt("%s/cgitrc", path); |
118 | if (!stat(p, &st)) { | 120 | if (!stat(p, &st)) { |