git diff --check whitespace checks, gitattributes - Mailing list pgsql-hackers

From Peter Eisentraut
Subject git diff --check whitespace checks, gitattributes
Date
Msg-id 1383707883.10722.5.camel@vanquo.pezone.net
Whole thread Raw
Responses Re: git diff --check whitespace checks, gitattributes  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: git diff --check whitespace checks, gitattributes  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
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.

One open question is whether psql output pasted into documentation, in
particular .sgml files, should preserve the trailing whitespace that
psql produces.  This is currently done inconsistently.

My preference is to trim the trailing whitespace, because otherwise it's
impossible to check for trailing whitespace errors in other parts of
those files.

Attachment

pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: List of "binary-compatible" data types
Next
From: Tom Lane
Date:
Subject: Re: git diff --check whitespace checks, gitattributes