Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial diff: ignore trailing whitespace?

I am in the distinctly unfortunate circumstance of working in an environment which worries little of the deep evil known as "trailing whitespace"... But, alas, the enlightened Mercurial persists in warning me, by means of red highlights in diffs, that code I will be checking in contains this unholy thing.

So, is there any way to tell Mercurial to ignore trailing whitespace in diffs?

I've tried all the obvious --ignore-* commands, and they seem to do nothing.

Thanks!

like image 718
David Wolever Avatar asked Jun 17 '09 16:06

David Wolever


1 Answers

Put in your hgrc file:

[color]
diff.trailingwhitespace = none

Read more about customizing color schemes on the ColorExtension wiki page

like image 51
Nicolas Dumazet Avatar answered Sep 21 '22 17:09

Nicolas Dumazet