use `text/x-patch' for .patch and .diff files

This commit is contained in:
Omar Polo 2021-04-21 07:51:29 +00:00
parent 5d1474a561
commit 4d820b6cd2
3 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2021-04-21 Omar Polo <op@omarpolo.com>
* mime.c (load_default_mime): use `text/x-patch' for .patch and .diff files
2021-04-14 Omar Polo <op@omarpolo.com>
* log.c (handle_imsg_log): print the datetime when logging to stderr

4
gmid.1
View File

@ -390,6 +390,8 @@ will be used, which is
by default.
.Pp
.Bl -tag -offset indent -width 14m -compact
.It diff
text/x-patch
.It gemini, gmi
text/gemini
.It gif
@ -400,6 +402,8 @@ image/jpeg
image/jpeg
.It markdown, md
text/markdown
.It patch
text/x-patch
.It pdf
application/pdf
.It png

2
mime.c
View File

@ -67,6 +67,8 @@ load_default_mime(struct mime *mime)
{"text/markdown", "markdown"},
{"text/markdown", "md"},
{"text/plain", "txt"},
{"text/x-patch", "diff"}
{"text/x-patch", "patch"},
{"text/xml", "xml"},
{NULL, NULL}
};