diff options
author | Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com> | 2010-05-19 22:43:11 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-19 20:42:34 -0700 |
commit | 5ec3e67052289217c84e53d2cda90d939ac5725b (patch) | |
tree | 925b092d3514202f5bb0af98f9e19dd639f74a99 /t/t0025-crlf-auto.sh | |
parent | fd6cce9e89ab5ac1125a3b5f5611048ad22379e7 (diff) | |
download | git-5ec3e67052289217c84e53d2cda90d939ac5725b.tar.gz |
Rename the "crlf" attribute "text"
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>
Diffstat (limited to 't/t0025-crlf-auto.sh')
-rwxr-xr-x | t/t0025-crlf-auto.sh | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/t/t0025-crlf-auto.sh b/t/t0025-crlf-auto.sh index 2781f15302..f5f67a6337 100755 --- a/t/t0025-crlf-auto.sh +++ b/t/t0025-crlf-auto.sh @@ -41,6 +41,7 @@ test_expect_success 'default settings cause no changes' ' test_expect_success 'crlf=true causes a CRLF file to be normalized' ' + # Backwards compatibility check rm -f .gitattributes tmp one two three && echo "two crlf" > .gitattributes && git read-tree --reset -u HEAD && @@ -51,6 +52,18 @@ test_expect_success 'crlf=true causes a CRLF file to be normalized' ' test -n "$twodiff" ' +test_expect_success 'text=true causes a CRLF file to be normalized' ' + + rm -f .gitattributes tmp one two three && + echo "two text" > .gitattributes && + git read-tree --reset -u HEAD && + + # Note, "normalized" means that git will normalize it if added + has_cr two && + twodiff=`git diff two` && + test -n "$twodiff" +' + test_expect_success 'eol=crlf gives a normalized file CRLFs with autocrlf=false' ' rm -f .gitattributes tmp one two three && @@ -101,11 +114,11 @@ test_expect_success 'autocrlf=true does not normalize CRLF files' ' test -z "$onediff" -a -z "$twodiff" -a -z "$threediff" ' -test_expect_success 'crlf=auto, autocrlf=true _does_ normalize CRLF files' ' +test_expect_success 'text=auto, autocrlf=true _does_ normalize CRLF files' ' rm -f .gitattributes tmp one two three && git config core.autocrlf true && - echo "* crlf=auto" > .gitattributes && + echo "* text=auto" > .gitattributes && git read-tree --reset -u HEAD && has_cr one && @@ -116,11 +129,11 @@ test_expect_success 'crlf=auto, autocrlf=true _does_ normalize CRLF files' ' test -z "$onediff" -a -n "$twodiff" -a -z "$threediff" ' -test_expect_success 'crlf=auto, autocrlf=true does not normalize binary files' ' +test_expect_success 'text=auto, autocrlf=true does not normalize binary files' ' rm -f .gitattributes tmp one two three && git config core.autocrlf true && - echo "* crlf=auto" > .gitattributes && + echo "* text=auto" > .gitattributes && git read-tree --reset -u HEAD && ! has_cr three && |