On Thu, 2016-02-04 at 21:00 -0500, tbsaunde+...@tbsaunde.org wrote:
> 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.

Does this only apply to changed lines in a commit?

Does the gcc/testsuite/.gitattributes file fully disable the top-level
one within gcc/testsuite?  Note that in the testsuite we'd want to have
the ability to have testcases with poor whitespace: in particular 
-Wmisleading-indentation needs to be able to be tested with poor
whitespace, and I suspect we'll want to add testcases for how well diag
nostics cope with mixed tabs and spaces etc.

> 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

Reply via email to