1) call an external command for diffs. You need something like
text/x-diff; cat %s | colordiff;copiousoutputin your ~/.mailcap and
text/x-patch; cat %s | colordiff;copiousoutput
auto_view text/x-diffin your ~/.muttrc. Unfortunately this method sucks, because a lot of patches are distributed in the body of the mail. Note that the mail body is usually better for patches that attachments (see The Perfect Patch).
auto_view text/x-patch
set allow_ansi
2) use mutt highlighting. This method is also not perfect, but I use it for years and I am very happy with it. You need to add
color body green default "^diff \-.*"to you ~/.muttrc. That's all :-)
color body green default "^index [a-f0-9].*"
color body green default "^\-\-\- .*"
color body green default "^[\+]{3} .*"
color body cyan default "^[\+][^\+]+.*"
color body red default "^\-[^\-]+.*"
color body brightblue default "^@@ .*"