From: Trevor Saunders <tbsaunde+...@tbsaunde.org> Hi,
We can tell git to highlight whitespace errors in diffs, and if you enable the default pre-commit hook git won't allow you to make a commit with a whitespace error violating the rules you told it about. These files as are could be improved some, they don't enforce whitespace rules on testsuite .exp files, and I'm not sure if we want to allow whitespace errors in testsuites for libraries, but I'd like to see if other people can suggest other improvements. Trev gcc/testsuite/ChangeLog: 2016-02-04 Trevor Saunders <tbsaunde+...@tbsaunde.org> * .gitattributes: New file. ChangeLog: 2016-02-04 Trevor Saunders <tbsaunde+...@tbsaunde.org> * .gitattributes: New file. --- .gitattributes | 1 + gcc/testsuite/.gitattributes | 1 + 2 files changed, 2 insertions(+) create mode 100644 .gitattributes create mode 100644 gcc/testsuite/.gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b38d7f1 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.{c,C,cc,h} whitespace=indent-with-non-tab,space-before-tab,trailing-space diff --git a/gcc/testsuite/.gitattributes b/gcc/testsuite/.gitattributes new file mode 100644 index 0000000..562b12e --- /dev/null +++ b/gcc/testsuite/.gitattributes @@ -0,0 +1 @@ +* -whitespace -- 2.7.0