This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [HOOK] Fix leading and trailing whitespace


On Wed, 5 Jun 2013, Ondrej Bilka wrote:

> Hi,
> 
> As I noticed problem of patches with trailing whitespaces I 
> decided to use a pre commit hook to solve this problem once for all.

The glibc repository already has a hook to reject commits with bad 
whitespace; we don't need another one.  git has or had a standard hook 
users can copy into place / chmod executable to have git warn if you are 
locally committing a patch with bad whitespace; again, there's no need for 
another version.

Hooks automatically modifying your source code seem a bad idea to me; 
there may be cases (e.g. test inputs) where the trailing whitespace is 
significant.

> As regenerated files need to remove these would it be possible to
> automaticaly run this script after generation?

This version looks like massive overkill for that.  The makefile rules for 
generated files with whitespace issues should just fix the whitespace 
using a trivial sed command.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]