Add option to allow differences in specific areas
I would love a way to "allow" a difference in a specific file region. For example, if I have two C object files that only have differences in a specific section. For example:
--- a/drivers/net/dsa/ocelot/felix.o
+++ b/drivers/net/dsa/ocelot/felix.o
├── readelf --wide --decompress --hex-dump=__bug_table {}
│ @@ -1,5 +1,5 @@
│
│ Hex dump of section '__bug_table':
│ NOTE: This section has relocations against it, but these have NOT been applied to this dump.
│ - 0x00000000 00000000 00000000 0f090000 ............
│ + 0x00000000 00000000 00000000 0e090000 ............
I'd like to have something like --allow-diff=__bug_table
where the above wouldn't be reported as a diff. If I use --exclude=__bug_table
, diffoscope will (correctly) fall back to showing the diff in raw xxd
output. Instead, I want to express "I expect a change in this area, but I want to know about changes in any other areas."