summaryrefslogtreecommitdiff
path: root/t/t0027-auto-crlf.sh
AgeCommit message (Collapse)AuthorFilesLines
2014-08-28t0027: Tests for core.eol=native, eol=lf, eol=crlfLibravatar Torsten Bögershausen1-100/+120
Add test cases for core.eol "native" and "" (unset). (MINGW uses CRLF, all other systems LF as native line endings) Add test cases for the attributes "eol=lf" and "eol=crlf" Other minor changes: - Use the more portable 'tr' instead of 'od -c' to convert '\n' into 'Q' and '\0' into 'N' - Style fixes for shell functions according to the coding guide lines - Replace "txtbin" with "attr" Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-08t0027: combinations of core.autocrlf, core.eol and textLibravatar Torsten Bögershausen1-0/+265
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>