summaryrefslogtreecommitdiffabout
path: root/cgit.c
authorLars Hjemli <hjemli@gmail.com>2010-08-21 13:08:01 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2010-08-22 11:35:47 (UTC)
commit515edb0da3b9156e07e269621d7474cdea82acaf (patch) (side-by-side diff)
treee5fed5e83f29166c23216437386e10070e1d258d /cgit.c
parent6d7552bc072599313ef423d69156d824c075572a (diff)
downloadcgit-515edb0da3b9156e07e269621d7474cdea82acaf.zip
cgit-515edb0da3b9156e07e269621d7474cdea82acaf.tar.gz
cgit-515edb0da3b9156e07e269621d7474cdea82acaf.tar.bz2
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 'cgit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/cgit.c b/cgit.c
index d6146e2..04cef23 100644
--- a/cgit.c
+++ b/cgit.c
@@ -74,7 +74,3 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
else if (!strcmp(name, "readme") && value != NULL) {
- char *colon;
- if (*value == '/' || ((colon = strchr(value, ':')) != NULL && colon != value && *(colon + 1) != '\0'))
- repo->readme = xstrdup(value);
- else
- repo->readme = xstrdup(fmt("%s/%s", repo->path, value));
+ repo->readme = xstrdup(value);
} else if (ctx.cfg.enable_filter_overrides) {
@@ -99,2 +95,4 @@ void config_cb(const char *name, const char *value)
repo_config(ctx.repo, name + 5, value);
+ else if (!strcmp(name, "readme"))
+ ctx.cfg.readme = xstrdup(value);
else if (!strcmp(name, "root-title"))