On Sat, May 29, 2010 at 06:48, demerphq <demerphq@gmail.com> wrote: > On 29 May 2010 01:28, karl williamson <public@khwilliamson.com> wrote: >> demerphq wrote: >> And while we're on the subject. Apparently another unwritten rule is about >> trailing white space. It would be best if that were written down, and there >> was some sort of checker for that, > > Actually there are. > > First do this: > > git config --global color.ui auto > > That should turn on colored output for git. Once the colored diff is > enabled you will easily spot trailing whitespace because it will be > highlighted in red when you do git diff. > > Additionally git supports hooks for various actions and events, and I > think one of the hooks (default disabled but distributed with git > iirc) does whitespace cleanup on commit. Actually git diff --check is the recommended Git way of doing this: $ git diff --check blead.. > /dev/null \ || echo It fixes the whitespace or it gets the hose againThread Previous