t0027: combinations of core.autocrlf, core.eol and text
authorTorsten Bögershausen <tboegi@web.de>
Sun, 29 Jun 2014 06:34:54 +0000 (08:34 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Jul 2014 19:40:40 +0000 (12:40 -0700)
commit343151dcbdf63a4f12b1a0108708280dc3883af6
tree43192d646789494a459c25b9b0f279d6333dee1a
parentb0cdb4dafc8531f16c3e0e0327bc03ca96dad9fe
t0027: combinations of core.autocrlf, core.eol and text

Historically there are 3 different parameters controlling how line endings
are handled by Git:
- core.autocrlf
- core.eol
- the "text" attribute in .gitattributes

There are different types of content:
- (1) Files with only LF
- (2) Files with only CRLF
- (3) Files with mixed LF and CRLF
- (4) Files with LF and/or CRLF with CR not followed by LF
- (5) Files which are binary (e.g. have NUL bytes)

Recently the question came up, how files with mixed EOLs are handled by Git
(and libgit2) when they are checked out and core.autocrlf=true.

See
http://git.661346.n2.nabble.com/The-different-EOL-behavior-between-libgit2-based-software-and-official-Git-td7613670.html#a7613801

Add the EXPENSIVE t0027-auto-crlf.sh to test all combination of files
and parameters for both "git add/commit" and "git checkout".

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0027-auto-crlf.sh [new file with mode: 0755]