Add UnifiedDiffWriter.write_index, for writing Index: lines.
Review Request #12629 — Created Sept. 23, 2022 and submitted — Latest diff uploaded
This adds
UnifiedDiffWriter.write_index()
, which writes a standard
Index: ...
line, followed by 67=
characters.This is a fairly standard convention used by Unified Diff variants to
help separate files when there may not otherwise be a clear boundary.
For instance, when there may be metadata changes or binary file
differences, but no---
/+++
headers.Like other methods, this accepts byte strings or Unicode strings,
handling encoding automatically.
Unit tests passed.
Used this in some in-progress work.