Bug 326894

Summary: kompare ignores binary files
Product: [Applications] kompare Reporter: mattm3a
Component: generalAssignee: Kompare developers <kompare-devel>
Status: RESOLVED DUPLICATE    
Severity: wishlist    
Priority: NOR    
Version: 4.1.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description mattm3a 2013-10-30 17:03:02 UTC
I am comparing two directories (say A and B), which contain both text and binary files. There is no information about the binary files. 

If you run diff at the command line, it will flag if a binary file is present only in directory A, present only in directory B, or the two binary files are different. Kompare provides no information for the binary files. 

Reproducible: Always

Steps to Reproduce:
1. Run kompare between two directories containing text and binary files. 
2.
3.
Actual Results:  
Binary files are ignored in the comparison. 

Expected Results:  
The expected result is similar to that given by the command line "diff". This flags if a binary file is present only in directory A, present only in directory B, or the two binary files are different.
Comment 1 Kevin Kofler 2013-11-10 17:42:24 UTC
Wasn't there a warning that the diff is possibly malformed and some hunks may be missing?

Kompare only operates on text files.
Comment 2 mattm3a 2013-11-18 19:01:26 UTC
Yes, there is such a warning. This warning does not easily translate to, "Kompare only operates on text files." 

Kompare is also described as "A diff/patch frontend". It would be nice if it could provide all of the data provided by diff, such as when binary files are different.
Comment 3 Kevin Kofler 2013-11-29 01:25:41 UTC
The problem is that diff does not produce that information in a machine-readable way. Instead, you get a translated (!) freeform message that "Binary files x and y differ", which is just ignored by patch like any other junk text line (and that's also what Kompare treats it as right now, a junk line). I can't really have Kompare check for the translations of that message in every single translation of the diff utility, yet that would be the only reliable way to handle it, because Kompare also works on diff files, which could have been generated in any locale.

There's a feature request for really supporting binary diffs, but that would mean moving beyond the diff utility, so it is unlikely to happen.

*** This bug has been marked as a duplicate of bug 155284 ***