From 6365886c25f67ac9c36f8f08edbb46e8f5c7e7e5 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Fri, 24 Mar 2017 11:37:53 -0400
Subject: [PATCH] Define a custom Git attribute to mark sources using our C
 style

---
 .gitattributes | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/.gitattributes b/.gitattributes
index 7b2913c..39d58ea 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2,18 +2,22 @@
 .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
+
 /GitSetup        export-ignore
 /*.sh            export-ignore eol=lf
 /*.bash          export-ignore eol=lf
 /.clang-format   export-ignore
 
-*.c              whitespace=tab-in-indent
-*.h              whitespace=tab-in-indent
-*.h.in           whitespace=tab-in-indent
-*.cxx            whitespace=tab-in-indent
-*.hxx            whitespace=tab-in-indent
-*.hxx.in         whitespace=tab-in-indent
-*.txt            whitespace=tab-in-indent
-*.cmake          whitespace=tab-in-indent
+*.c              our-c-style
+*.c.in           our-c-style
+*.cxx            our-c-style
+*.h              our-c-style
+*.h.in           our-c-style
+*.hxx            our-c-style
+*.hxx.in         our-c-style
 
+*.cmake          whitespace=tab-in-indent
 *.rst            whitespace=tab-in-indent conflict-marker-size=79
+*.txt            whitespace=tab-in-indent
-- 
GitLab