aboutsummaryrefslogtreecommitdiffstats
path: root/scan-tree.c
diff options
context:
space:
mode:
authorJason A. Donenfeld2013-05-26 15:20:02 +0200
committerJason A. Donenfeld2013-05-26 16:30:03 +0200
commitdcbc0438b2543a733858d62170f3110a89edbed6 (patch)
treebdacfe4546c88bf6b03860ea69a0cad885fa6af4 /scan-tree.c
parentfe36f84d843cd755c6dab629a0758264de5bcc00 (diff)
downloadcgit-dcbc0438b2543a733858d62170f3110a89edbed6.tar.gz
cgit-dcbc0438b2543a733858d62170f3110a89edbed6.tar.bz2
cgit-dcbc0438b2543a733858d62170f3110a89edbed6.zip
readme: use string_list instead of space deliminations
Now this is possible in cgitrc - readme=:README.md readme=:readme.md readme=:README.mkd readme=:readme.mkd readme=:README.rst readme=:readme.rst readme=:README.html readme=:readme.html readme=:README.htm readme=:readme.htm readme=:README.txt readme=:readme.txt readme=:README readme=:readme readme=:INSTALL.txt readme=:install.txt readme=:INSTALL readme=:install Suggested-by: John Keeping <john@keeping.me.uk> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'scan-tree.c')
-rw-r--r--scan-tree.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/scan-tree.c b/scan-tree.c
index a1ec8fb..2684b44 100644
--- a/scan-tree.c
+++ b/scan-tree.c
@@ -1,7 +1,7 @@
1/* scan-tree.c 1/* scan-tree.c
2 * 2 *
3 * Copyright (C) 2008-2009 Lars Hjemli 3 * Copyright (C) 2008-2009 Lars Hjemli
4 * Copyright (C) 2010, 2012 Jason A. Donenfeld <Jason@zx2c4.com> 4 * Copyright (C) 2010-2013 Jason A. Donenfeld <Jason@zx2c4.com>
5 * 5 *
6 * Licensed under GNU General Public License v2 6 * Licensed under GNU General Public License v2
7 * (see COPYING for full license text) 7 * (see COPYING for full license text)
@@ -147,12 +147,6 @@ static void add_repo(const char *base, struct strbuf *path, repo_config_fn fn)
147 strbuf_setlen(path, pathlen); 147 strbuf_setlen(path, pathlen);
148 } 148 }
149 149
150 if (!repo->readme) {
151 strbuf_addstr(path, "README.html");
152 if (!stat(path->buf, &st))
153 repo->readme = "README.html";
154 strbuf_setlen(path, pathlen);
155 }
156 if (ctx.cfg.section_from_path) { 150 if (ctx.cfg.section_from_path) {
157 n = ctx.cfg.section_from_path; 151 n = ctx.cfg.section_from_path;
158 if (n > 0) { 152 if (n > 0) {