Faster binary check for Diff class
What does this MR do and why?
This is a follow-up for !197920 (merged), based on !194490 (closed).
This MR improves Gitlab::Git::Diff
binary check performance by reusing existing binary
flag coming straight from Git.
No behaviour change expected. This change only affects diffs coming from Gitaly. MR diffs in DB are not affected.
This also fixes the diff message when unidiff is requested for a binary diff.
Before
- Fetch a diff from Gitaly
- Send the whole diff (not blobs) to CharlockHolmes to check if it contains binary content