Skip to content

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

  1. Fetch a diff from Gitaly
  2. Send the whole diff (not blobs) to CharlockHolmes to check if it contains binary content

Merge request reports

Loading