summaryrefslogtreecommitdiff
path: root/t/t0025-crlf-auto.sh
AgeCommit message (Collapse)AuthorFilesLines
2014-07-08t0025: rename the test filesLibravatar Torsten Bögershausen1-61/+61
The current test files are named one, two and three. Make it clearer what the tests do and rename them into LFonly, CRLFonly and LFwithNUL. After the renaming we can see easier that we may want more test cases for 2 types of files: - files which have mixed LF and CRLF line endings, - files which have mixed LF and CR line endings. See commit fd6cce9e, "Add per-repository eol normalization" and "the new safer autocrlf handling" in convert.c Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09t/t0025-crlf-auto.sh: avoid "test <cond> -a/-o <cond>"Libravatar Elia Pinto1-3/+3
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-29t0025-crlf-auto.sh: use the $( ... ) construct for command substitutionLibravatar Elia Pinto1-19/+19
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-19Rename the "crlf" attribute "text"Libravatar Eyvind Bernhardsen1-4/+17
As discussed on the list, "crlf" is not an optimal name. Linus suggested "text", which is much better. Signed-off-by: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-19Add per-repository eol normalizationLibravatar Eyvind Bernhardsen1-6/+6
Change the semantics of the "crlf" attribute so that it enables end-of-line normalization when it is set, regardless of "core.autocrlf". Add a new setting for "crlf": "auto", which enables end-of-line conversion but does not override the automatic text file detection. Add a new attribute "eol" with possible values "crlf" and "lf". When set, this attribute enables normalization and forces git to use CRLF or LF line endings in the working directory, respectively. The line ending style to be used for normalized text files in the working directory is set using "core.autocrlf". When it is set to "true", CRLFs are used in the working directory; when set to "input" or "false", LFs are used. Signed-off-by: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-19Add tests for per-repository eol normalizationLibravatar Eyvind Bernhardsen1-0/+142
Signed-off-by: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>