From d01c600c179593a53162a9d4e3040ecfc5078fdc Mon Sep 17 00:00:00 2001 From: Ferry Huberts Date: Tue, 19 Jul 2011 10:51:58 +0200 Subject: ui_plain: automatically lookup mimetype when mimetype-file is set For sites that do not want to configure mime types by hand but still want the correct mime type for 'plain' blobs, configuring a mime type file is made possible. This is handy since such a file is normally already provided (at least on Linux systems). Also, this reflects the gitweb option '$mimetypes_file' Signed-off-by: Ferry Huberts Signed-off-by: Lars Hjemli --- cgit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cgit.c') diff --git a/cgit.c b/cgit.c index b7807ad..abb698b 100644 --- a/cgit.c +++ b/cgit.c @@ -236,6 +236,8 @@ void config_cb(const char *name, const char *value) ctx.cfg.ssdiff = atoi(value); else if (!strcmp(name, "agefile")) ctx.cfg.agefile = xstrdup(value); + else if (!strcmp(name, "mimetype-file")) + ctx.cfg.mimetype_file = xstrdup(value); else if (!strcmp(name, "renamelimit")) ctx.cfg.renamelimit = atoi(value); else if (!strcmp(name, "remove-suffix")) -- cgit