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

Diego Biurrun diego at biurrun.de
Mon Feb 5 17:27:26 CET 2007


On Mon, Feb 05, 2007 at 01:56:19AM +0100, Michael Niedermayer wrote:
> 
> On Sun, Feb 04, 2007 at 08:13:58PM +0100, Diego Biurrun wrote:
> > 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 ...
> 
> additionally if anyone is annoyed by it he can just configure his editor
> to remove trailing whitespace or use a little script to run sed over the
> files and then svn di / svn ci or somethig like that

Is that a vote in favor?

Diego




More information about the MPlayer-dev-eng mailing list