mirror of
https://git.zx2c4.com/cgit
synced 2025-06-24 10:48:44 +02:00
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>
This commit is contained in:
parent
96f05018c9
commit
d01c600c17
4 changed files with 65 additions and 1 deletions
2
cgit.c
2
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"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue