develooper Front page | perl.perl5.porters | Postings from May 2010

Re: [perl #75350] PATCH: revamp ibcmp_utf8() for efficiency, clarity

Thread Previous
From:
Ævar Arnfjörð Bjarmason
Date:
May 29, 2010 02:04
Subject:
Re: [perl #75350] PATCH: revamp ibcmp_utf8() for efficiency, clarity
Message ID:
AANLkTilcC7Aiv3QpNzjqXLd3xy7i1E6_QCkMKzkDQ_tG@mail.gmail.com
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 again

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About