How to make `hg diff` show whitespace changes?

Matt Mackall mpm at selenic.com
Wed Jan 13 16:25:44 UTC 2016


On Wed, 2016-01-13 at 11:03 -0500, Noemi Millman wrote:
> Thanks, Matt!
> 
> Why would a merge show a file as changed if contents, permissions, line
> endings, etc. haven't changed?

If I say the result of merging an apple and an orange is apple, then by virtue
of the fact that orange != apple, something has changed and something needs to
be recorded when committing.

But to diff, the question "what is the difference between apple, orange, and
apple" is meaningless: it can only compare two things, not three. Again, diff
predates the concept of merges (and version control in general), so don't expect
too much of it.

Related:

https://www.mercurial-scm.org/wiki/MergeDiffs

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial mailing list