[MPlayer-dev-eng] [PATCH] Improve the readability of dynamic labels which scroll
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun Jan 30 18:41:34 CET 2011
On Sun, Jan 30, 2011 at 05:23:31PM +0100, Nicolas George wrote:
> Le primidi 11 pluviôse, an CCXIX, Ingo Brückl a écrit :
> > (BTW, the diff of gui/app.h
> > shows the disadvantage of pretty-printing. Although only a few lines added,
> > the diff is lengthy and hard to read.)
>
> The usual policy for MPlayer and FFmpeg is to split the patch in two: first
> functional changes, and then whitespace changes, even if it means to have a
> badly indented commit for a short period of time.
>
> For example if
>
> frobnicate(foo);
>
> is to become:
>
> if (bar) {
> frobnicate(foo);
> } else {
> frobnicate(foo + 1);
> }
>
> you do an intermediate commit:
>
> if (bar) {
> frobnicate(foo);
> } else {
> frobnicate(foo + 1);
> }
Or for the app.h part at least there is no issue with doing it the
other way round and it will not look ugly at any point.
But with all the reformatting, please also keep in mind that it
makes svn log/svn blame etc. harder to use, so always do consider
if you can do things in a nicer way that avoids large cosmetic
stuff.
With code for example if large reindations become necessary
that's often a hint that that code really should be in a
separate function anyway. Sure that will clutter svn log as
well, but at least that kind of cleanup also helps code quality
a good bit more than only proper indentation.
More information about the MPlayer-dev-eng
mailing list