sanitizeDiff

fun sanitizeDiff(raw: String, keep: Set<String> = emptySet()): Sanitized(source)

Keeps file headers, hunk positions and changed lines of a unified diff; context lines, blob ids and the text after a hunk header are dropped before the same rules run.