[MPlayer-dev-eng] Trailing whitespace removal and precommit hooks

Diego Biurrun diego at biurrun.de
Sun Feb 4 20:13:58 CET 2007


On Thu, Feb 01, 2007 at 10:31:43PM +0100, Reimar Döffinger wrote:
> On Thu, Feb 01, 2007 at 10:11:45PM +0100, Roberto Togni wrote:
> [...]
> > And I'm against any kind of precommit scripts: something that aborts a
> > commit for silly reasons is very annoying.
> 
> IMO it's not a silly reason, because after intensively reworking some
> code I often waste quite a bit of time to reduce the size of the patch
> by reading such trailing whitespace (esp. the ones that are alone on a
> single line). It also helps people committing patches from other people
> who do not want to add such whitespace.

I have to agree with Reimar here.

Removing all trailing whitespace and then not adding a pre-commit script
is rather pointless as it will quickly get added back.  I'm speaking
from experience here as I was the person who removed all trailing
whitespace and tabs from FFmpeg.  When I installed pre-commit script
afterwards, quite a few tabs and trailing whitespace had snuck into the
sources again.

Mechanical checks may be an annoyance but they are there to protect
against one's own stupidity.  It's like a regression test, it's there to
catch mistakes ...

Diego




More information about the MPlayer-dev-eng mailing list