On Fri, 18 Nov 2005, Junio C Hamano wrote:
And at this point it becomes more and more tempting to have our
own internal diff generator, without relying on external diff.
A midway compromise solution would be to detect if either file
is binary ourselves and not to call diff but always say "Binary
files difer".
Umm.. Why not just say "if the line after the 'diff' line doesn't start
with '@@ ', then it's a binary diff"?
And not care at _all_ about what it says.
We require unified diffs, and they _always_ start with '@@ ' after the
header. No need to check anything else.
Linus