Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t0025-crlf-renormalize.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t0025-crlf-renormalize.sh` 39 lines ยท 991 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='CRLF renormalization' 4 5 . ./test-lib.sh 6 7 test_expect_success setup ' 8 git config core.autocrlf false && 9 printf "LINEONE\nLINETWO\nLINETHREE\n" >LF.txt && 10 printf "LINEONE\r\nLINETWO\r\nLINETHREE\r\n" >CRLF.txt && 11 printf "LINEONE\r\nLINETWO\nLINETHREE\n" >CRLF_mix_LF.txt && 12 git add . && 13 git commit -m initial 14 ' 15 16 test_expect_success 'renormalize CRLF in repo' ' 17 echo "*.txt text=auto" >.gitattributes && 18 git add --renormalize "*.txt" && 19 cat >expect <<-\EOF && 20 i/lf w/crlf attr/text=auto CRLF.txt 21 i/lf w/lf attr/text=auto LF.txt 22 i/lf w/mixed attr/text=auto CRLF_mix_LF.txt 23 EOF 24 git ls-files --eol >tmp && 25 sed -e "s/ / /g" -e "s/ */ /g" tmp | 26 sort >actual && 27 test_cmp expect actual 28 ' 29 30 test_expect_success 'ignore-errors not mistaken for renormalize' ' 31 git reset --hard && 32 echo "*.txt text=auto" >.gitattributes && 33 git ls-files --eol >expect && 34 git add --ignore-errors "*.txt" && 35 git ls-files --eol >actual && 36 test_cmp expect actual 37 ' 38 39 test_done