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>
Cette révision appartient à :
Lars Hjemli
2010-08-21 15:08:01 +02:00
Parent 6d7552bc07
révision 515edb0da3
6 fichiers modifiés avec 43 ajouts et 24 suppressions

Voir le fichier

@ -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)) {