[MPlayer-dev-eng] [RFC] Removing all trailing whitespace

Ivo ivop at euronet.nl
Mon Aug 21 16:57:58 CEST 2006


On Monday 21 August 2006 16:05, Roberto Togni wrote:
> On Sun, 20 Aug 2006 18:49:30 +0200
>
> Ivo <ivop at euronet.nl> wrote:
> > find . -name '*.[ch]' -exec sed -i 's/[ \t]*$//' {} \;
> >
> > What do you think? I know it's only cosmetics, but since we reject all
> > patches that contain trailing whitespace, isn't it time to clean up the
> > whole tree?
>
> How many lines are affected? If it touches a small number of files and
> lines I'm ok with it, else I'm against it.

This is the total number of lines changed:

$ svn diff | grep '^+[^+]' | wc -l
7261

> Trailing whitespaces are harmless, they don't mess up code indentation
> and does not create any kind of problem with compilers or editors.
> Having many lines changed just for removing trailing whitespaces will
> just make diffs harder to read and mess up annotate.

I don't see why. It'll be a one-time commit with cosmetics only. How would 
that make diffs harder to read?

> But I'm ok with removing whitespaces and/or tabs from empty lines.

That would be

$ svn diff | grep '^+$' | wc -l
5651

almost 80% of the lines affected :-)

--Ivo



More information about the MPlayer-dev-eng mailing list