Re: git diff --check whitespace checks, gitattributes

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: git diff --check whitespace checks, gitattributes
Date: 2013-11-06 14:17:42
Message-ID: 527A4F86.2070705@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 11/05/2013 10:31 PM, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>> Attached is a patch that
>> - Adds a .gitattributes file to configure appropriate whitespace checks
>> for git diff --check.
>> - Cleans up all whitespace errors found in this way in existing code.
>> Most of that is in files not covered by pgindent, some in new code since
>> the last pgindent.
>> This makes the entire tree git diff --check clean. After this, future
>> patches can be inspected for whitespace errors with git diff --check,
>> something that has been discussed on occasion.
> I always (well, almost always) do git diff --check, so making it stronger
> sounds good to me. But it sounds like this still leaves it to the
> committer to remember to run it. Can we do anything about that?
>
>

Personally I don't get the mania about trailing whitespace, but maybe
that's just me.

We could certainly implement a hook on the server that would reject
cases that fail this test, but we might find it hamstrings us a bit in
future. I'm not sure what else could be done to remedy committer
forgetfulness, though.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ian Lawrence Barwick 2013-11-06 14:32:26 Re: FDW: possible resjunk columns in AddForeignUpdateTargets
Previous Message Albe Laurenz 2013-11-06 13:59:18 FDW: possible resjunk columns in AddForeignUpdateTargets