Check jgit RawText#isBinary before MimeTypes
JGit's isBinary function implements a simple heuristic: it considers
a file binary if and only if one of the first 8000 bytes is NUL.
This is the same heuristic used to decide whether to show a diff as
text.
Keep the MimeTypes based check to allow users to continue to exclude
text-based checks for some file types. A followup change will allow
whitelisting some files or commits using notes in the
refs/notes/uploadvalidator ref, allowing the MimeTypes check to be
dropped.
Change-Id: I2726af4bf3235ee7a03cc06d88c9877f7081ae4b
4 files changed