Hi Alon,

2012/4/2 Alon Bar-Lev <alon.bar...@gmail.com>:
> Having the text auto detection is a risk, as the detection may detect
> text files that are not text and vise versa.
>
> Having global setting will create confusion and differentiate between
> users. So this patch also move this to local repository.

IMHO, this is a real benefit. Reduces the number of steps necessary to
contribute and avoids line-ending mistakes for new contributions.

> Having git to check out files differently in different OS is also
> a not correct, as checkouts may be used in shares or in *NIX emulation
> environments, so it have no effect.
>
> Another issue is packaging, if we change out the tree differently
> in several OSes, we may have different package content, which is
> something that should be avoided.
>
> Currently any editor of MS supports LF end of lines, so there is no
> need to convert source files while checking out.
>
> The visual studio files should be stored as CRLF as they are generated
> by visual studio every save, in a way that CRLF are added.
>
> I handled only the files that may be touch by MS users.

The rest I generally agree with, but don't have strong feelings about them.

> diff --git a/.gitattributes b/.gitattributes
> new file mode 100644
> index 0000000..34463f9
> --- /dev/null
> +++ b/.gitattributes
> @@ -0,0 +1,7 @@
> +*.c eol=lf
> +*.h eol=lf
> +*.rc eol=lf
> +*.txt eol=lf
> +*.bat eol=lf
> +*.vc*proj* eol=crlf
> +*.sln eol=crlf

Why not .rc and .bat as crlf too?

Apart from that, ACK.

Cheers
Fabian

Reply via email to