summaryrefslogtreecommitdiffabout
path: root/cgit.c
authorLars Hjemli <hjemli@gmail.com>2010-09-19 16:43:58 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2010-09-19 16:43:58 (UTC)
commite76a1ea427792aaa331cdec70d7d4ff1fb3422e0 (patch) (side-by-side diff)
treefaeee0c46a2d470b29b46481f74070557e3fdb8d /cgit.c
parent857696dd3d85f7c12c718a46d82a2405e6a9919a (diff)
parent515edb0da3b9156e07e269621d7474cdea82acaf (diff)
downloadcgit-e76a1ea427792aaa331cdec70d7d4ff1fb3422e0.zip
cgit-e76a1ea427792aaa331cdec70d7d4ff1fb3422e0.tar.gz
cgit-e76a1ea427792aaa331cdec70d7d4ff1fb3422e0.tar.bz2
Merge branch 'lh/readme'
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
@@ -69,17 +69,13 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
repo->max_stats = cgit_find_stats_period(value, NULL);
else if (!strcmp(name, "module-link"))
repo->module_link= xstrdup(value);
else if (!strcmp(name, "section"))
repo->section = xstrdup(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) {
if (!strcmp(name, "about-filter"))
repo->about_filter = new_filter(value, 0);
else if (!strcmp(name, "commit-filter"))
repo->commit_filter = new_filter(value, 0);
else if (!strcmp(name, "source-filter"))
@@ -94,12 +90,14 @@ void config_cb(const char *name, const char *value)
else if (!strcmp(name, "repo.url"))
ctx.repo = cgit_add_repo(value);
else if (ctx.repo && !strcmp(name, "repo.path"))
ctx.repo->path = trim_end(value, '/');
else if (ctx.repo && !prefixcmp(name, "repo."))
repo_config(ctx.repo, name + 5, value);
+ else if (!strcmp(name, "readme"))
+ ctx.cfg.readme = xstrdup(value);
else if (!strcmp(name, "root-title"))
ctx.cfg.root_title = xstrdup(value);
else if (!strcmp(name, "root-desc"))
ctx.cfg.root_desc = xstrdup(value);
else if (!strcmp(name, "root-readme"))
ctx.cfg.root_readme = xstrdup(value);