diff options
author | Ferry Huberts <ferry.huberts@pelagic.nl> | 2011-07-19 08:51:58 +0000 |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2011-07-19 09:30:07 +0000 |
commit | d01c600c179593a53162a9d4e3040ecfc5078fdc (patch) | |
tree | 487f8afaefe7b5f09f05d0d3e3796aaff86b931a /cgit.c | |
parent | 96f05018c9dbdf8131f18c87ee3bbbac40e0f729 (diff) | |
download | cgit-d01c600c179593a53162a9d4e3040ecfc5078fdc.tar cgit-d01c600c179593a53162a9d4e3040ecfc5078fdc.tar.gz cgit-d01c600c179593a53162a9d4e3040ecfc5078fdc.zip |
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 <ferry.huberts@pelagic.nl>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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")) |