summaryrefslogtreecommitdiff
path: root/.gitattributes
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-22 14:58:27 -0500
committerBrad King <brad.king@kitware.com>2017-02-22 16:53:29 -0500
commitf6986ee479f1cce6da17859eaf6a0616852b9e20 (patch)
treea577513f4ad6f580818d8442dad2fe309d1dcfb8 /.gitattributes
parent2256c3a7db89c58ecdd0e6cfcdff7805522187f1 (diff)
downloadcmake-f6986ee479f1cce6da17859eaf6a0616852b9e20.tar.gz
Define a custom Git attribute to mark sources using our C style
Diffstat (limited to '.gitattributes')
-rw-r--r--.gitattributes20
1 files changed, 15 insertions, 5 deletions
diff --git a/.gitattributes b/.gitattributes
index dfc32503a6..abb698ad09 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,6 +1,9 @@
.gitattributes export-ignore
.hooks* export-ignore
+# Custom attribute to mark sources as using our C code style.
+[attr]our-c-style whitespace=tab-in-indent
+
# Custom attribute to mark sources as generated.
# Do not perform whitespace checks.
[attr]generated whitespace=-tab-in-indent,-indent-with-non-tab
@@ -20,10 +23,17 @@ configure crlf=input
*.sln -crlf
*.vcproj -crlf
-*.c whitespace=tab-in-indent
-*.h whitespace=tab-in-indent
-*.cxx whitespace=tab-in-indent
-*.txt whitespace=tab-in-indent
-*.cmake whitespace=tab-in-indent
+*.c our-c-style
+*.cc our-c-style
+*.cpp our-c-style
+*.cu our-c-style
+*.cxx our-c-style
+*.h our-c-style
+*.hh our-c-style
+*.hpp our-c-style
+*.hxx our-c-style
+*.notcu our-c-style
+*.cmake whitespace=tab-in-indent
*.rst whitespace=tab-in-indent conflict-marker-size=79
+*.txt whitespace=tab-in-indent