How to make `hg diff` show whitespace changes?

Matt Mackall mpm at selenic.com
Wed Jan 13 09:53:09 CST 2016


On Wed, 2016-01-13 at 07:13 -0800, Noemi wrote:
> When I run `hg status`, it shows a few files as changed, but `hg diff` 
> outputs absolutely nothing.  Why might this happen other than whitespace 
> changes?

Line ending, empty vs deleted, copies, renames, exec bits, merges, etc.

>   If it is whitespace changes, how can I make `hg diff` display 
> them?  The docs explain how to ignore whitespace changes, but not how to 
> make sure they're displayed.

They're displayed by default.

The standard diff tool was created in 1974. Mercurial was created in 2005. So
asking why the diff format doesn't capture all the details is a bit like asking
why a VHS (1976) copy of a BluRay (2006) doesn't look as good.

We also support the Git format with -g which will show some but not all of the
aforementioned differences and also breaks some of the tools that work with
standard diffs.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list