aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorEyvind Bernhardsen <eyvind.bernhardsen@gmail.com>2010-05-19 22:43:10 +0200
committerJunio C Hamano <gitster@pobox.com>2010-05-19 20:36:15 -0700
commitfd6cce9e89ab5ac1125a3b5f5611048ad22379e7 (patch)
tree4c7f3223c70f7153d6f174df1d84345f90b1aaf9 /t
parent56499eb9b84453742222676d98e11be3c390c34d (diff)
downloadgit-fd6cce9e89ab5ac1125a3b5f5611048ad22379e7.tar.gz
git-fd6cce9e89ab5ac1125a3b5f5611048ad22379e7.tar.xz
Add per-repository eol normalization
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>
Diffstat (limited to 't')
-rwxr-xr-xt/t0025-crlf-auto.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t0025-crlf-auto.sh b/t/t0025-crlf-auto.sh
index 2c9833800..2781f1530 100755
--- a/t/t0025-crlf-auto.sh
+++ b/t/t0025-crlf-auto.sh
@@ -39,7 +39,7 @@ test_expect_success 'default settings cause no changes' '
test -z "$onediff" -a -z "$twodiff" -a -z "$threediff"
'
-test_expect_failure 'crlf=true causes a CRLF file to be normalized' '
+test_expect_success 'crlf=true causes a CRLF file to be normalized' '
rm -f .gitattributes tmp one two three &&
echo "two crlf" > .gitattributes &&
@@ -51,7 +51,7 @@ test_expect_failure 'crlf=true causes a CRLF file to be normalized' '
test -n "$twodiff"
'
-test_expect_failure 'eol=crlf gives a normalized file CRLFs with autocrlf=false' '
+test_expect_success 'eol=crlf gives a normalized file CRLFs with autocrlf=false' '
rm -f .gitattributes tmp one two three &&
git config core.autocrlf false &&
@@ -63,7 +63,7 @@ test_expect_failure 'eol=crlf gives a normalized file CRLFs with autocrlf=false'
test -z "$onediff"
'
-test_expect_failure 'eol=crlf gives a normalized file CRLFs with autocrlf=input' '
+test_expect_success 'eol=crlf gives a normalized file CRLFs with autocrlf=input' '
rm -f .gitattributes tmp one two three &&
git config core.autocrlf input &&
@@ -75,7 +75,7 @@ test_expect_failure 'eol=crlf gives a normalized file CRLFs with autocrlf=input'
test -z "$onediff"
'
-test_expect_failure 'eol=lf gives a normalized file LFs with autocrlf=true' '
+test_expect_success 'eol=lf gives a normalized file LFs with autocrlf=true' '
rm -f .gitattributes tmp one two three &&
git config core.autocrlf true &&
@@ -101,7 +101,7 @@ test_expect_success 'autocrlf=true does not normalize CRLF files' '
test -z "$onediff" -a -z "$twodiff" -a -z "$threediff"
'
-test_expect_failure 'crlf=auto, autocrlf=true _does_ normalize CRLF files' '
+test_expect_success 'crlf=auto, autocrlf=true _does_ normalize CRLF files' '
rm -f .gitattributes tmp one two three &&
git config core.autocrlf true &&
@@ -128,7 +128,7 @@ test_expect_success 'crlf=auto, autocrlf=true does not normalize binary files' '
test -z "$threediff"
'
-test_expect_failure 'eol=crlf _does_ normalize binary files' '
+test_expect_success 'eol=crlf _does_ normalize binary files' '
rm -f .gitattributes tmp one two three &&
echo "three eol=crlf" > .gitattributes &&