Re: [git patch] urgent e1000 fix

From: Tomasz Kłoczko
Date: Fri Jun 24 2005 - 05:19:08 EST


On Fri, 24 Jun 2005, Linus Torvalds wrote:



On Fri, 24 Jun 2005, Keith Owens wrote:

On Fri, 24 Jun 2005 09:49:05 +0300,
Denis Vlasenko <vda@xxxxxxxxxxxxx> wrote:
On Friday 24 June 2005 02:33, Linus Torvalds wrote:
To actually allow real fuzz or to allow real whitespace differences in the
patch data itself is a _much_ bigger issue than this trivial patch
corruption, and I'd prefer to avoid going there if at all possible.

How about automatic stripping of _trailing_ whitespace on all incoming
patches? IIRC no file type (C, sh, Makefile, you name it) depends on
conservation of it, thus it's 100% safe.

One (admittedly rare) case - adding a text file that contains an
embedded patch, so you have a patch that includes a patch. This is
sometimes done in Documentation files when an external file has to be
changed. In embedded patch, empty lines are converted to a single
space, which then appears as trailing whitespace. Not sure if that is
a big enough reason not to strip whitespace.

There's a much more important reason never _ever_ to mess with whitespace
in patches: it by definition measn that the resulting whitespace now does
not match the thing at the other end, and that _will_ mean merge problems
later (ie subsequent patches will have increasingly incorrect whitespace,
and now everybody has to live with whitespace not being reliable).

So no. The only reliable way to handle whitespace is to never corrupt it.
Don't make excuses for broken email clients etc.

Linus .. why for kernel tree can't be used indent or other source code formater ?

If indent tool can't feet all what is neccessary or have some not ease solveable bugs or can't be adopted other now avalaible tool IMO *it is* *time* for start project with special formater for kernel source tree. Using it can cut all this kind dissusions :>

If indent can handle correcly kernel source tree it will be posiible place
in source root tree one .indent.pro file and add small modificatiom to make suit with additional "indent" target.
In case using indent neccessary patch can take only few lines :>

After this all developers before generate patches will must only pass "make indent" .. nothing more.
As result can be also removed Documentation/CodingStyle file (description about passing "make indent" before generate patches can be moved to Documentation/SubmittingPatches)

kloczek
--
-----------------------------------------------------------
*Ludzie nie mają problemów, tylko sobie sami je stwarzają*
-----------------------------------------------------------
Tomasz Kłoczko, sys adm @zie.pg.gda.pl|*e-mail: kloczek@xxxxxxxxxxxxxxxxxx*