summaryrefslogtreecommitdiff
path: root/.gitattributes
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2013-11-10 09:20:52 -0500
committerPeter Eisentraut <peter_e@gmx.net>2013-11-10 14:48:29 -0500
commit001e114b8d59f4eaf2a314a2bc5e57078afdf82f (patch)
tree606fa622be346ef917886a29aea7e17383e00d31 /.gitattributes
parentdca09ac53329e92d73f45674957c26d3d7ae5117 (diff)
downloadpostgresql-001e114b8d59f4eaf2a314a2bc5e57078afdf82f.tar.gz
Fix whitespace issues found by git diff --check, add gitattributes
Set per file type attributes in .gitattributes to fine-tune whitespace checks. With the associated cleanups, the tree is now clean for git
Diffstat (limited to '.gitattributes')
-rw-r--r--.gitattributes34
1 files changed, 34 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000..7d1d16416e
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,34 @@
+* whitespace=space-before-tab,trailing-space
+*.[chly] whitespace=space-before-tab,trailing-space,indent-with-non-tab,tabwidth=4
+*.dsl whitespace=space-before-tab,trailing-space,tab-in-indent
+*.patch -whitespace
+*.pl whitespace=space-before-tab,trailing-space,tabwidth=4
+*.po whitespace=space-before-tab,trailing-space,tab-in-indent,-blank-at-eof
+*.sgml whitespace=space-before-tab,trailing-space,tab-in-indent,-blank-at-eol
+*.x[ms]l whitespace=space-before-tab,trailing-space,tab-in-indent
+
+# Avoid confusing ASCII underlines with leftover merge conflict markers
+README conflict-marker-size=32
+README.* conflict-marker-size=32
+
+# Certain data files that contain special whitespace, and other special cases
+**/data/*.data -whitespace
+contrib/tsearch2/sql/tsearch2.sql whitespace=space-before-tab,blank-at-eof,-blank-at-eol
+doc/bug.template whitespace=space-before-tab,-blank-at-eof,blank-at-eol
+src/backend/catalog/sql_features.txt whitespace=space-before-tab,blank-at-eof,-blank-at-eol
+src/backend/tsearch/hunspell_sample.affix whitespace=-blank-at-eof
+
+# Test output files that contain extra whitespace
+**/expected/*.out -whitespace
+**/output/*.source -whitespace
+src/interfaces/ecpg/test/expected/* -whitespace
+src/interfaces/libpq/test/expected.out whitespace=-blank-at-eof
+
+# These files are maintained or generated elsewhere. We take them as is.
+configure -whitespace
+ppport.h -whitespace
+src/backend/regex/COPYRIGHT -whitespace
+src/backend/regex/re_syntax.n -whitespace
+src/backend/snowball/libstemmer/*.c -whitespace
+src/backend/utils/mb/Unicode/*-std.txt -whitespace
+src/include/snowball/libstemmer/* -whitespace