[coreboot] [RFC] How to prevent whitespace issues in patches?

smithbone at gmail.com smithbone at gmail.com
Sat Mar 16 20:43:37 CET 2013

On 03/15/2013 01:19 PM, ron minnich wrote:
> There has to be an option to override, however. That's what we've
> found on chromeos.

You may be setup for that already via policy rather than a hard git 
reject.  IIUC your patches all go into gerrit first and then a limited 
number of people commit them.  You could impose policy that astyle (or 
some other formatter) will be run on the patches and if it re-formats 
them the maintainer(s) can either reject them or choose to allow 
whatever formatting deviation there is.  Although if deviations happen a 
lot then its probably easier to just give up your religion on whatever 
that style deviation is and go with something astyle will format.

Over the years I've dealt with many different styles and its really just 
a matter of staring at the code for long enough.  I've given up being 
religious on style except for 1 item. 2 line if statements that don't 
have {} surrounding the body.  Those are bugs waiting to happen.  Alas 
it's used so much that even that isn't worth arguing over.

Richard A. Smith
smithbone at gmail.com

More information about the coreboot mailing list