Josh Cooper, I think using `scrub` could create confusion in some cases, like the bellow example, where I have two different binary files for which diff, with and without scrub, shows no effective change. I propose to implement your initial proposal, if diff encoding is not valid we should print generic message: `Binary files <A> and <B> differs`
root@chill-menfolk:~# cat /tmp/content_file_test.ckBuSa | od -x |
0000000 d1c7 85fc |
0000004 |
root@chill-menfolk:~# cat /tmp/content_file_test.FPDRPp | od -x |
0000000 d1c7 84fc |
0000004 |
root@chill-menfolk:~# diff -u /tmp/content_file_test.ckBuSa /tmp/content_file_test.FPDRPp |
--- /tmp/content_file_test.ckBuSa 2019-11-20 11:57:37.651243336 +0000 |
+++ /tmp/content_file_test.FPDRPp 2019-11-20 09:46:00.954412083 +0000 |
@@ -1 +1 @@ |
-ÇÑü |
\ No newline at end of file |
+ÇÑü |
\ No newline at end of file |
irb(main):002:0> puts `diff -u /tmp/content_file_test.ckBuSa /tmp/content_file_test.FPDRPp`.scrub |
--- /tmp/content_file_test.ckBuSa 2019-11-20 11:57:37.651243336 +0000 |
+++ /tmp/content_file_test.FPDRPp 2019-11-20 09:46:00.954412083 +0000 |
@@ -1 +1 @@ |
-���� |
\ No newline at end of file |
+���� |
\ No newline at end of file |
=> nil |
|
|