RE: svn commit: r1704374 - in /subversion/trunk/subversion: include/svn_diff.h include/svn_error_codes.h libsvn_diff/binary_diff.c libsvn_diff/diff.h libsvn_diff/parse-diff.c tests/cmdline/patch_tests.py
From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 23 Sep 2015 15:34:22 +0200
> -----Original Message-----
> Without completely understanding how the binary diff / patch is now
This is completely against the rest of the patch implementation, and how other diff implementations work.
For many reasons (including: legacy, compatibility, etc.) all of them ignore everything they don't understand. The current (1.8/1.9) patch code just ignores these hunks and doesn't error on them.
The patch code only errors out on fatal errors.
While it would be nice to error out and say the user should get a good file, there is no way he can.
Hand editing binary patches (that are typically gzipped binary blobs internally) is virtually impossible and you can't trust the content came from some trusted source anyway. You should always review the resulting binary when you get it from an untrusted source. (The same applies to unified diffs, but reviewing those is much easier :-))
This is an archived mail posted to the Subversion Dev mailing list.