From 4d820b6cd266d6e81b38e25e0850f8990abef32e Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Wed, 21 Apr 2021 07:51:29 +0000 Subject: use `text/x-patch' for .patch and .diff files --- ChangeLog | 4 ++++ gmid.1 | 4 ++++ mime.c | 2 ++ 3 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9978df4..3d4a531 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2021-04-21 Omar Polo + + * mime.c (load_default_mime): use `text/x-patch' for .patch and .diff files + 2021-04-14 Omar Polo * log.c (handle_imsg_log): print the datetime when logging to stderr diff --git a/gmid.1 b/gmid.1 index 15dea63..77473a4 100644 --- a/gmid.1 +++ b/gmid.1 @@ -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 diff --git a/mime.c b/mime.c index 7fb444d..096046e 100644 --- a/mime.c +++ b/mime.c @@ -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} }; -- cgit v1.2.3