Re: [PATCH] Add gitattributes file making whitespace checking pickier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 10, 2008 at 02:52:50AM -0800, Junio C Hamano wrote:
> I've tried "unexpand | expand" to Documentation/*.txt and
> compared the formatted documentation before and after the
> change, and as we suspected everything seems to match.

Thanks for testing that.

> So I am considering applying this patch.  We may want to tighten
> it later but as the initial set of rules this should do.

No objections from me.--b.

> 
> -- >8 --
> [PATCH] Add gitattributes file making whitespace checking pickier
> 
> This establishes what the "bad" whitespaces are for this
> project.
> 
> The rules are:
> 
>  - For C source files, trailing whitespaces, an HT that follows
>    a SP in the leading indent, and initial indent by SP that can
>    be replaced with HT are all bad.
> 
>  - The same rule applies to the AsciiDoc input files in the
>    Documentation/ hierarchy.
> 
>  - It is Ok to indent with all spaces the Python and Elisp
>    sources in the contrib/ area.
> 
> Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
> ---
> 
>  .gitattributes               |    1 +
>  Documentation/.gitattributes |    1 +
>  contrib/.gitattributes       |    3 +++
>  3 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/.gitattributes b/.gitattributes
> new file mode 100644
> index 0000000..9dd769a
> --- /dev/null
> +++ b/.gitattributes
> @@ -0,0 +1 @@
> +*.[ch] whitespace
> diff --git a/Documentation/.gitattributes b/Documentation/.gitattributes
> new file mode 100644
> index 0000000..ddb0301
> --- /dev/null
> +++ b/Documentation/.gitattributes
> @@ -0,0 +1 @@
> +*.txt whitespace
> diff --git a/contrib/.gitattributes b/contrib/.gitattributes
> new file mode 100644
> index 0000000..2b48d05
> --- /dev/null
> +++ b/contrib/.gitattributes
> @@ -0,0 +1,3 @@
> +*.py whitespace=!indent,trail,space
> +*.el whitespace=!indent,trail,space
> +fast-import/git-p4 whitespace=!indent,trail,space
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux