Point binary file diff's SHA256 hashes to their corresponding file attachment.
Review Request #14792 — Created Jan. 29, 2026 and updated — Latest diff uploaded
Filediffs have
patched_sha256andorig_sha256attributes that are
hashes of their patched and original file contents. These get set for
non-binary file diffs the first time that they're loaded into the diff
viewer. Originally, these don't get set for binary file diffs.We recently gave file attachments a
sha256_checksumattribute which
is also a hash of its file contents. For binary file diffs, we can point
to it's corresponding file attachment's hash for both the patched file
and original file. Now, the SHAs will be set for binary file diffs, and
accessible through the file diff_sha256attributes or the file
attachments'sha256_checksum.
- Ran unit tests.
- Accessed the
patched_sha256andorig_sha256attributes for a
binary file diff and saw it was the same as the file attachments'
versions.