mirror of
https://git.zx2c4.com/cgit
synced 2025-08-04 01:54:28 +02:00
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>
This commit is contained in:
parent
6d7552bc07
commit
515edb0da3
6 changed files with 43 additions and 24 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue