Re: [PATCH] Show binary file size change in diff --stat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin wrote:
Hi,

On Wed, 28 Feb 2007, Rogan Dawes wrote:

Johannes Schindelin wrote:

On Wed, 28 Feb 2007, Rogan Dawes wrote:

How about showing the size of the changes between the 2 files via the libxdiff binary patch function?
I briefly considered this, too. But what would it tell you in the case of a jpg? I think it has more disadvantages than advantages...
It would still tell you the extent of the changes. i.e. Did we change only 10 bytes of the file, or is it a dramatic change?

I was not explicit enough, okay. I was not so worried about the case where only 10 bytes changed. If you insert a single dot in a jpg image, chances are that your binary content will change _a lot_.

So, no problem deducing from 10 bytes changed that it was a minor change. But you cannot deduce the opposite of a 1MB change!

Hth,
Dscho


Yeah, I did understand that.

However, if we were to generalise, making a change to an XML document (wrapping the whole thing in an additional tag, with the associated indentation adjustments), we'd still see all the lines in the file change, even though the actual (semantic?) change is small. However, we would still report the full numbers of lines added and deleted regardless.

Why should a binary file be any different? It would be up to the observer to make a conclusion as to the significance of the numbers, based on their intrinsic knowledge of the file type, and its properties.

I just believe that showing bytes changed for binary files is _consistent_ with what we do for text.

Rogan
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]