From: Junio C Hamano <gitster@pobox•com>
To: tboegi@web•de
Cc: git@vger•kernel.org
Subject: Re: [PATCH v5 3/4] t0027: test cases for combined attributes
Date: Tue, 19 Apr 2016 14:32:46 -0700 [thread overview]
Message-ID: <xmqq4maxz3lt.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1461072362-2835-1-git-send-email-tboegi@web.de> (tboegi@web.de's message of "Tue, 19 Apr 2016 15:26:02 +0200")
tboegi@web•de writes:
> From: Torsten Bögershausen <tboegi@web•de>
>
> Add more test cases for the not normalized files ("NNO"). The
> "text" attribute is most important, use it as the first parameter.
> "ident", if set, is the second paramater followed by the eol
> attribute. The eol attribute overrides core.autocrlf, which
> overrides core.eol.
> indent is not yet uses, this will be done in the next commit.
>
> Use loops to test more combinations of attributes, like
> "* text eol=crlf" or especially "*text=auto eol=crlf".
>
> Currently "* text=auto eol=lf" does the same as "* text eol=lf",
> as the eol attribute overrides "text=auto", this will change in
> future.
Will change in future in what way? In patch 5/4?
>
> Signed-off-by: Torsten Bögershausen <tboegi@web•de>
> ---
> t/t0027-auto-crlf.sh | 298 ++++++++++++++++++++++-----------------------------
> 1 file changed, 129 insertions(+), 169 deletions(-)
>
> diff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh
> index 9fe539b..fd5e326 100755
> --- a/t/t0027-auto-crlf.sh
> +++ b/t/t0027-auto-crlf.sh
> @@ -52,14 +52,17 @@ create_gitattributes () {
> create_NNO_files () {
> for crlf in false true input
> do
> - for attr in "" auto text -text lf crlf
> + for attr in "" auto text -text
> do
> - pfx=NNO_${crlf}_attr_${attr} &&
> - cp CRLF_mix_LF ${pfx}_LF.txt &&
> - cp CRLF_mix_LF ${pfx}_CRLF.txt &&
> - cp CRLF_mix_LF ${pfx}_CRLF_mix_LF.txt &&
> - cp CRLF_mix_LF ${pfx}_LF_mix_CR.txt &&
> - cp CRLF_mix_LF ${pfx}_CRLF_nul.txt
> + for aeol in "" lf crlf
> + do
> + pfx=NNO_attr_${attr}_aeol_${aeol}_${crlf}
> + cp CRLF_mix_LF ${pfx}_LF.txt &&
> + cp CRLF_mix_LF ${pfx}_CRLF.txt &&
> + cp CRLF_mix_LF ${pfx}_CRLF_mix_LF.txt &&
> + cp CRLF_mix_LF ${pfx}_LF_mix_CR.txt &&
> + cp CRLF_mix_LF ${pfx}_CRLF_nul.txt
> + done
> done
> done
> }
> @@ -100,16 +103,17 @@ commit_check_warn () {
> }
>
> commit_chk_wrnNNO () {
> - crlf=$1
> - attr=$2
> - lfwarn=$3
> - crlfwarn=$4
> - lfmixcrlf=$5
> - lfmixcr=$6
> - crlfnul=$7
> - pfx=NNO_${crlf}_attr_${attr}
> + attr=$1 ; shift
> + aeol=$1 ; shift
> + crlf=$1 ; shift
> + lfwarn=$1 ; shift
> + crlfwarn=$1 ; shift
> + lfmixcrlf=$1 ; shift
> + lfmixcr=$1 ; shift
> + crlfnul=$1 ; shift
> + pfx=NNO_attr_${attr}_aeol_${aeol}_${crlf}
> #Commit files on top of existing file
> - create_gitattributes "$attr" &&
> + create_gitattributes "$attr" $aeol &&
> for f in LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
> do
> fname=${pfx}_$f.txt &&
> @@ -122,19 +126,19 @@ commit_chk_wrnNNO () {
> test_expect_success "commit NNO files crlf=$crlf attr=$attr LF" '
> check_warning "$lfwarn" ${pfx}_LF.err
> '
> - test_expect_success "commit NNO files crlf=$crlf attr=$attr CRLF" '
> + test_expect_success "commit NNO files attr=$attr aeol=$aeol crlf=$crlf CRLF" '
> check_warning "$crlfwarn" ${pfx}_CRLF.err
> '
>
> - test_expect_success "commit NNO files crlf=$crlf attr=$attr CRLF_mix_LF" '
> + test_expect_success "commit NNO files attr=$attr aeol=$aeol crlf=$crlf CRLF_mix_LF" '
> check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
> '
>
> - test_expect_success "commit NNO files crlf=$crlf attr=$attr LF_mix_cr" '
> + test_expect_success "commit NNO files attr=$attr aeol=$aeol crlf=$crlf LF_mix_cr" '
> check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
> '
>
> - test_expect_success "commit NNO files crlf=$crlf attr=$attr CRLF_nul" '
> + test_expect_success "commit NNO files attr=$attr aeol=$aeol crlf=$crlf CRLF_nul" '
> check_warning "$crlfnul" ${pfx}_CRLF_nul.err
> '
> }
> @@ -163,6 +167,7 @@ stats_ascii () {
>
> # contruct the attr/ returned by git ls-files --eol
> # Take none (=empty), one or two args
> +# convert.c: eol=XX overrides text=auto
> attr_ascii () {
> case $1,$2 in
> -text,*) echo "-text" ;;
> @@ -170,8 +175,8 @@ attr_ascii () {
> text,lf) echo "text eol=lf" ;;
> text,crlf) echo "text eol=crlf" ;;
> auto,) echo "text=auto" ;;
> - auto,lf) echo "text=auto eol=lf" ;;
> - auto,crlf) echo "text=auto eol=crlf" ;;
> + auto,lf) echo "text eol=lf" ;;
> + auto,crlf) echo "text eol=crlf" ;;
> lf,) echo "text eol=lf" ;;
> crlf,) echo "text eol=crlf" ;;
> ,) echo "" ;;
> @@ -196,28 +201,29 @@ check_files_in_repo () {
> }
>
> check_in_repo_NNO () {
> - crlf=$1
> - attr=$2
> - lfname=$3
> - crlfname=$4
> - lfmixcrlf=$5
> - lfmixcr=$6
> - crlfnul=$7
> - pfx=NNO_${crlf}_attr_${attr}_
> - test_expect_success "compare_files $lfname ${pfx}LF.txt" '
> - compare_files $lfname ${pfx}LF.txt
> + attr=$1 ; shift
> + aeol=$1 ; shift
> + crlf=$1 ; shift
> + lfname=$1 ; shift
> + crlfname=$1 ; shift
> + lfmixcrlf=$1 ; shift
> + lfmixcr=$1 ; shift
> + crlfnul=$1 ; shift
> + pfx=NNO_attr_${attr}_aeol_${aeol}_${crlf}
> + test_expect_success "compare_files $lfname ${pfx}_LF.txt" '
> + compare_files $lfname ${pfx}_LF.txt
> '
> - test_expect_success "compare_files $crlfname ${pfx}CRLF.txt" '
> - compare_files $crlfname ${pfx}CRLF.txt
> + test_expect_success "compare_files $crlfname ${pfx}_CRLF.txt" '
> + compare_files $crlfname ${pfx}_CRLF.txt
> '
> - test_expect_success "compare_files $lfmixcrlf ${pfx}CRLF_mix_LF.txt" '
> - compare_files $lfmixcrlf ${pfx}CRLF_mix_LF.txt
> + test_expect_success "compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt" '
> + compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
> '
> - test_expect_success "compare_files $lfmixcr ${pfx}LF_mix_CR.txt" '
> - compare_files $lfmixcr ${pfx}LF_mix_CR.txt
> + test_expect_success "compare_files $lfmixcr ${pfx}_LF_mix_CR.txt" '
> + compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
> '
> - test_expect_success "compare_files $crlfnul ${pfx}CRLF_nul.txt" '
> - compare_files $crlfnul ${pfx}CRLF_nul.txt
> + test_expect_success "compare_files $crlfnul ${pfx}_CRLF_nul.txt" '
> + compare_files $crlfnul ${pfx}_CRLF_nul.txt
> '
> }
>
> @@ -232,7 +238,7 @@ checkout_files () {
> lfmixcrlf=$1 ; shift
> lfmixcr=$1 ; shift
> crlfnul=$1 ; shift
> - create_gitattributes "$attr" "$ident" &&
> + create_gitattributes "$attr" $ident $aeol &&
> git config core.autocrlf $crlf &&
> pfx=eol_${ceol}_crlf_${crlf}_attr_${attr}_ &&
> for f in LF CRLF LF_mix_CR CRLF_mix_LF LF_nul
> @@ -245,7 +251,7 @@ checkout_files () {
> fi
> done
>
> - test_expect_success "ls-files --eol attr=$attr $ident $aeol core.autocrlf=$crlf core.eol=$ceol" '
> + test_expect_success "ls-files --eol attr=$attr $ident aeol=$aeol core.autocrlf=$crlf core.eol=$ceol" '
> test_when_finished "rm expect actual" &&
> sort <<-EOF >expect &&
> i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
> @@ -260,19 +266,19 @@ checkout_files () {
> sort >actual &&
> test_cmp expect actual
> '
> - test_expect_success "checkout $ident $attr $aeol core.autocrlf=$crlf core.eol=$ceol file=LF" "
> + test_expect_success "checkout attr=$attr $ident aeol=$aeol core.autocrlf=$crlf core.eol=$ceol file=LF" "
> compare_ws_file $pfx $lfname crlf_false_attr__LF.txt
> "
> - test_expect_success "checkout $ident $attr $aeol core.autocrlf=$crlf core.eol=$ceol file=CRLF" "
> + test_expect_success "checkout attr=$attr $ident aeol=$aeol core.autocrlf=$crlf core.eol=$ceol file=CRLF" "
> compare_ws_file $pfx $crlfname crlf_false_attr__CRLF.txt
> "
> - test_expect_success "checkout $ident $attr $aeol core.autocrlf=$crlf core.eol=$ceol file=CRLF_mix_LF" "
> + test_expect_success "checkout attr=$attr $ident aeol=$aeol core.autocrlf=$crlf core.eol=$ceol file=CRLF_mix_LF" "
> compare_ws_file $pfx $lfmixcrlf crlf_false_attr__CRLF_mix_LF.txt
> "
> - test_expect_success "checkout $ident $attr $aeol core.autocrlf=$crlf core.eol=$ceol file=LF_mix_CR" "
> + test_expect_success "checkout attr=$attr $ident aeol=$aeol core.autocrlf=$crlf core.eol=$ceol file=LF_mix_CR" "
> compare_ws_file $pfx $lfmixcr crlf_false_attr__LF_mix_CR.txt
> "
> - test_expect_success "checkout $ident $attr $aeol core.autocrlf=$crlf core.eol=$ceol file=LF_nul" "
> + test_expect_success "checkout attr=$attr $ident aeol=$aeol core.autocrlf=$crlf core.eol=$ceol file=LF_nul" "
> compare_ws_file $pfx $crlfnul crlf_false_attr__LF_nul.txt
> "
> }
> @@ -386,31 +392,31 @@ test_expect_success 'commit files attr=crlf' '
> commit_check_warn input "crlf" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" ""
> '
>
> -# attr LF CRLF CRLFmixLF LF_mix_CR CRLFNUL
> -commit_chk_wrnNNO false "" "" "" "" "" ""
> -commit_chk_wrnNNO true "" "LF_CRLF" "" "" "" ""
> -commit_chk_wrnNNO input "" "" "" "" "" ""
> -
> +# attr LF CRLF CRLFmixLF LF_mix_CR CRLFNUL
> +commit_chk_wrnNNO "" "" false "" "" "" "" ""
> +commit_chk_wrnNNO "" "" true LF_CRLF "" "" "" ""
> +commit_chk_wrnNNO "" "" input "" "" "" "" ""
>
> -commit_chk_wrnNNO false "auto" "$WILC" "$WICL" "$WAMIX" "" ""
> -commit_chk_wrnNNO true "auto" "LF_CRLF" "" "LF_CRLF" "" ""
> -commit_chk_wrnNNO input "auto" "" "CRLF_LF" "CRLF_LF" "" ""
> +commit_chk_wrnNNO "auto" "" false "$WILC" "$WICL" "$WAMIX" "" ""
> +commit_chk_wrnNNO "auto" "" true LF_CRLF "" LF_CRLF "" ""
> +commit_chk_wrnNNO "auto" "" input "" CRLF_LF CRLF_LF "" ""
>
> -commit_chk_wrnNNO false "text" "$WILC" "$WICL" "$WAMIX" "$WILC" "$WICL"
> -commit_chk_wrnNNO true "text" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" ""
> -commit_chk_wrnNNO input "text" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF"
> -
> -commit_chk_wrnNNO false "-text" "" "" "" "" ""
> -commit_chk_wrnNNO true "-text" "" "" "" "" ""
> -commit_chk_wrnNNO input "-text" "" "" "" "" ""
> -
> -commit_chk_wrnNNO false "lf" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF"
> -commit_chk_wrnNNO true "lf" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF"
> -commit_chk_wrnNNO input "lf" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF"
> +for crlf in true false input
> +do
> + commit_chk_wrnNNO -text "" $crlf "" "" "" "" ""
> + commit_chk_wrnNNO -text lf $crlf "" "" "" "" ""
> + commit_chk_wrnNNO -text crlf $crlf "" "" "" "" ""
> + commit_chk_wrnNNO "" lf $crlf "" CRLF_LF CRLF_LF "" CRLF_LF
> + commit_chk_wrnNNO "" crlf $crlf LF_CRLF "" LF_CRLF LF_CRLF ""
> + commit_chk_wrnNNO auto lf $crlf "" CRLF_LF CRLF_LF "" CRLF_LF
> + commit_chk_wrnNNO auto crlf $crlf LF_CRLF "" LF_CRLF LF_CRLF ""
> + commit_chk_wrnNNO text lf $crlf "" CRLF_LF CRLF_LF "" CRLF_LF
> + commit_chk_wrnNNO text crlf $crlf LF_CRLF "" LF_CRLF LF_CRLF ""
> +done
>
> -commit_chk_wrnNNO false "crlf" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" ""
> -commit_chk_wrnNNO true "crlf" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" ""
> -commit_chk_wrnNNO input "crlf" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" ""
> +commit_chk_wrnNNO "text" "" false "$WILC" "$WICL" "$WAMIX" "$WILC" "$WICL"
> +commit_chk_wrnNNO "text" "" true LF_CRLF "" LF_CRLF LF_CRLF ""
> +commit_chk_wrnNNO "text" "" input "" CRLF_LF CRLF_LF "" CRLF_LF
>
> test_expect_success 'create files cleanup' '
> rm -f *.txt &&
> @@ -441,24 +447,20 @@ test_expect_success 'commit -text' '
> check_files_in_repo input "-text" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
> '
>
> -# attr LF CRLF CRLF_mix_LF LF_mix_CR CRLFNUL
> -check_in_repo_NNO false "" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
> -check_in_repo_NNO true "" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
> -check_in_repo_NNO input "" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
> -
> -check_in_repo_NNO false "auto" LF LF LF LF_mix_CR CRLF_nul
> -check_in_repo_NNO true "auto" LF LF LF LF_mix_CR CRLF_nul
> -check_in_repo_NNO input "auto" LF LF LF LF_mix_CR CRLF_nul
> -
> -check_in_repo_NNO false "text" LF LF LF LF_mix_CR LF_nul
> -check_in_repo_NNO true "text" LF LF LF LF_mix_CR LF_nul
> -check_in_repo_NNO input "text" LF LF LF LF_mix_CR LF_nul
> -
> -check_in_repo_NNO false "-text" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
> -check_in_repo_NNO true "-text" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
> -check_in_repo_NNO input "-text" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
> -
> -
> +for crlf in true false input
> +do
> + # attr aeol LF CRLF CRLF_mix_LF LF_mix_CR CRLFNUL
> + check_in_repo_NNO "" "" $crlf LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
> + check_in_repo_NNO -text "" $crlf LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
> + check_in_repo_NNO -text lf $crlf LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
> + check_in_repo_NNO -text crlf $crlf LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
> + check_in_repo_NNO auto "" $crlf LF LF LF LF_mix_CR CRLF_nul
> + check_in_repo_NNO auto lf $crlf LF LF LF LF_mix_CR LF_nul
> + check_in_repo_NNO auto crlf $crlf LF LF LF LF_mix_CR LF_nul
> + check_in_repo_NNO text "" $crlf LF LF LF LF_mix_CR LF_nul
> + check_in_repo_NNO text lf $crlf LF LF LF LF_mix_CR LF_nul
> + check_in_repo_NNO text crlf $crlf LF LF LF LF_mix_CR LF_nul
> +done
> ################################################################################
> # Check how files in the repo are changed when they are checked out
> # How to read the table below:
> @@ -490,89 +492,47 @@ LFNUL=LF_nul
> fi
> export CRLF_MIX_LF_CR MIX NL
>
> -checkout_files "" "" "" false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" "" "" false crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" "" "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" "" "" false native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" "" "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" "" "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" "" "" true "" CRLF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" "" "" true crlf CRLF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" "" "" true lf CRLF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" "" "" true native CRLF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" ident "" false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" ident "" false crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" ident "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" ident "" false native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" ident "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" ident "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" ident "" true "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" ident "" true crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" ident "" true lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "" ident "" true native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "auto" "" "" false "" $NL CRLF $MIX_CRLF_LF LF_mix_CR LF_nul
> -checkout_files "auto" "" "" false crlf CRLF CRLF CRLF LF_mix_CR LF_nul
> -checkout_files "auto" "" "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "auto" "" "" false native $NL CRLF $MIX_CRLF_LF LF_mix_CR LF_nul
> -checkout_files "auto" "" "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "auto" "" "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "auto" "" "" true "" CRLF CRLF CRLF LF_mix_CR LF_nul
> -checkout_files "auto" "" "" true crlf CRLF CRLF CRLF LF_mix_CR LF_nul
> -checkout_files "auto" "" "" true lf CRLF CRLF CRLF LF_mix_CR LF_nul
> -checkout_files "auto" "" "" true native CRLF CRLF CRLF LF_mix_CR LF_nul
> -checkout_files "auto" ident "" false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "auto" ident "" false crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "auto" ident "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "auto" ident "" false native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "auto" ident "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "auto" ident "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "auto" ident "" true "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "auto" ident "" true crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "auto" ident "" true lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -checkout_files "auto" ident "" true native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> -
> -for id in "" ident;
> +# Same handling with and without ident
> +for id in ""
> do
> - checkout_files "crlf" "$id" "" false "" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "crlf" "$id" "" false crlf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "crlf" "$id" "" false lf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "crlf" "$id" "" false native CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "crlf" "$id" "" input "" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "crlf" "$id" "" input lf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "crlf" "$id" "" true "" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "crlf" "$id" "" true crlf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "crlf" "$id" "" true lf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "crlf" "$id" "" true native CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "lf" "$id" "" false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "lf" "$id" "" false crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "lf" "$id" "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "lf" "$id" "" false native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "lf" "$id" "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "lf" "$id" "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "lf" "$id" "" true "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "lf" "$id" "" true crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "lf" "$id" "" true lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "lf" "$id" "" true native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "text" "$id" "" false "" $NL CRLF $MIX_CRLF_LF $MIX_LF_CR $LFNUL
> - checkout_files "text" "$id" "" false crlf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "text" "$id" "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "text" "$id" "" false native $NL CRLF $MIX_CRLF_LF $MIX_LF_CR $LFNUL
> - checkout_files "text" "$id" "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "text" "$id" "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "text" "$id" "" true "" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "text" "$id" "" true crlf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "text" "$id" "" true lf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "text" "$id" "" true native CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> - checkout_files "-text" "$id" "" false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "-text" "$id" "" false crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "-text" "$id" "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "-text" "$id" "" false native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "-text" "$id" "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "-text" "$id" "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "-text" "$id" "" true "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "-text" "$id" "" true crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "-text" "$id" "" true lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> - checkout_files "-text" "$id" "" true native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> + for ceol in lf crlf native
> + do
> + for crlf in true false input
> + do
> + # -text overrides core.autocrlf and core.eol
> + # text and eol=crlf or eol=lf override core.autocrlf and core.eol
> + checkout_files -text "$id" "" "$crlf" "$ceol" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> + checkout_files -text "$id" "lf" "$crlf" "$ceol" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> + checkout_files -text "$id" "crlf" "$crlf" "$ceol" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> + # text
> + checkout_files text "$id" "lf" "$crlf" "$ceol" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> + checkout_files text "$id" "crlf" "$crlf" "$ceol" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> + # currently the same as text, eol=XXX
> + checkout_files auto "$id" "lf" "$crlf" "$ceol" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> + checkout_files auto "$id" "crlf" "$crlf" "$ceol" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> + done
> +
> + # core.autocrlf false, different core.eol
> + checkout_files "" "$id" "" false "$ceol" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> + # core.autocrlf true
> + checkout_files "" "$id" "" true "$ceol" CRLF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> + # text: core.autocrlf = true overrides core.eol
> + checkout_files auto "$id" "" true "$ceol" CRLF CRLF CRLF LF_mix_CR LF_nul
> + checkout_files text "$id" "" true "$ceol" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> + # text: core.autocrlf = input overrides core.eol
> + checkout_files text "$id" "" input "$ceol" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> + checkout_files auto "$id" "" input "$ceol" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> + # text=auto + eol=XXX
> + done
> + # text: core.autocrlf=false uses core.eol
> + checkout_files text "$id" "" false crlf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
> + checkout_files text "$id" "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
> + # text: core.autocrlf=false and core.eol unset(or native) uses native eol
> + checkout_files text "$id" "" false "" $NL CRLF $MIX_CRLF_LF $MIX_LF_CR $LFNUL
> + checkout_files text "$id" "" false native $NL CRLF $MIX_CRLF_LF $MIX_LF_CR $LFNUL
> + # auto: core.autocrlf=false and core.eol unset(or native) uses native eol
> + checkout_files auto "$id" "" false "" $NL CRLF $MIX_CRLF_LF LF_mix_CR LF_nul
> + checkout_files auto "$id" "" false native $NL CRLF $MIX_CRLF_LF LF_mix_CR LF_nul
> done
>
> # Should be the last test case: remove some files from the worktree
next prev parent reply other threads:[~2016-04-19 21:32 UTC|newest]
Thread overview: 126+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Message-Id=xmqqio26nqk8.fsf@gitster.mtv.corp.google.com>
2016-02-11 16:16 ` [PATCH 1/3] git reset --hard gives clean working tree tboegi
2016-02-11 18:49 ` Junio C Hamano
2016-03-05 7:23 ` Torsten Bögershausen
2016-03-05 8:05 ` Junio C Hamano
2016-03-05 8:27 ` Torsten Bögershausen
2016-03-05 21:18 ` Junio C Hamano
2016-03-07 8:14 ` Junio C Hamano
2016-03-07 8:51 ` Junio C Hamano
2016-03-07 8:58 ` Torsten Bögershausen
2016-03-07 22:34 ` Junio C Hamano
2016-03-29 13:25 ` [PATCH v1 1/7] Make it possible to get sha1 for a path from the index tboegi
2016-03-29 13:28 ` Duy Nguyen
2016-03-29 13:31 ` Duy Nguyen
2016-03-29 15:05 ` Torsten Bögershausen
2016-03-29 19:32 ` Eric Sunshine
2016-03-29 13:25 ` [PATCH v1 2/7] convert.c: stream and early out tboegi
2016-03-29 13:25 ` [PATCH v1 3/7] Allow core.autocrlf=input and core.eol=crlf tboegi
2016-03-29 13:25 ` [PATCH v1 4/7] t0027: TC for combined attributes tboegi
2016-03-29 13:25 ` [PATCH v1 5/7] CRLF: unify the "auto" handling tboegi
2016-03-29 19:42 ` Eric Sunshine
2016-03-29 13:25 ` [PATCH v1 6/7] correct blame for files commited with CRLF tboegi
2016-03-29 17:21 ` Junio C Hamano
2016-03-29 19:51 ` Torsten Bögershausen
2016-03-29 19:58 ` Junio C Hamano
2016-03-29 20:25 ` Junio C Hamano
2016-03-29 20:32 ` Junio C Hamano
2016-03-29 20:50 ` Junio C Hamano
2016-03-30 17:48 ` Torsten Bögershausen
2016-03-29 13:25 ` [PATCH v1 7/7] convert.c: more safer crlf handling with text attribute tboegi
2016-03-29 18:37 ` Junio C Hamano
2016-04-01 16:08 ` [PATCH v2 1/7] Make it possible to get sha1 for a path from the index tboegi
2016-04-01 16:08 ` [PATCH v2 2/7] convert.c: stream and early out tboegi
2016-04-01 16:08 ` [PATCH v2 3/7] Allow core.autocrlf=input and core.eol=crlf tboegi
2016-04-01 22:20 ` Junio C Hamano
2016-04-01 16:08 ` [PATCH v2 4/7] t0027: TC for combined attributes tboegi
2016-04-01 22:22 ` Junio C Hamano
2016-04-01 16:08 ` [PATCH v2 5/7] CRLF: unify the "auto" handling tboegi
2016-04-01 22:25 ` Junio C Hamano
2016-04-01 16:08 ` [PATCH v2 6/7] correct blame for files commited with CRLF tboegi
2016-04-01 22:29 ` Junio C Hamano
2016-04-03 9:29 ` Torsten Bögershausen
2016-04-01 16:08 ` [PATCH v2 7/7] convert.c: more safer crlf handling with text attribute tboegi
2016-04-05 19:23 ` [PATCH v1] correct blame for files commited with CRLF tboegi
2016-04-05 20:57 ` Junio C Hamano
2016-04-05 21:12 ` Junio C Hamano
2016-04-06 4:17 ` Torsten Bögershausen
2016-04-19 13:24 ` [PATCH v5 1/4] t0027: Make more reliable tboegi
2016-04-19 13:26 ` [PATCH v5 2/4] convert: allow core.autocrlf=input and core.eol=crlf tboegi
2016-04-19 13:26 ` [PATCH v5 3/4] t0027: test cases for combined attributes tboegi
2016-04-19 21:32 ` Junio C Hamano [this message]
2016-04-20 15:52 ` Torsten Bögershausen
2016-04-19 13:26 ` [PATCH v5 4/4] convert.c: ident + core.autocrlf didn't work tboegi
2016-04-20 22:27 ` Junio C Hamano
2016-04-22 14:38 ` [PATCH v6 01/10] t0027: Make more reliable tboegi
2016-04-22 22:03 ` Junio C Hamano
2016-04-24 3:45 ` Torsten Bögershausen
2016-04-22 14:53 ` [PATCH v6 02/10] convert: allow core.autocrlf=input and core.eol=crlf tboegi
2016-04-22 14:53 ` [PATCH v6 03/10] t0027: test cases for combined attributes tboegi
2016-04-22 14:53 ` [PATCH v6 04/10] convert.c: ident + core.autocrlf didn't work tboegi
2016-04-22 14:53 ` [PATCH v6 05/10] read-cache: factor out get_sha1_from_index() helper tboegi
2016-04-22 14:53 ` [PATCH v6 06/10] convert.c: stream and early out tboegi
2016-04-22 14:53 ` [PATCH v6 07/10] convert: unify the "auto" handling of CRLF tboegi
2016-04-22 14:53 ` [PATCH v6 08/10] convert.c: more safer crlf handling with text attribute tboegi
2016-04-22 14:53 ` [PATCH v6 09/10] t6038; use crlf on all platforms tboegi
2016-04-22 14:53 ` [PATCH v6 10/10] ce_compare_data() did not respect conversion tboegi
2016-04-24 15:10 ` [PATCH v6b 01/10] t0027: Make commit_chk_wrnNNO() reliable tboegi
2016-04-24 15:11 ` [PATCH v6b 02/10] convert: allow core.autocrlf=input and core.eol=crlf tboegi
2016-04-24 15:11 ` [PATCH v6b 03/10] t0027: test cases for combined attributes tboegi
2016-04-24 15:11 ` [PATCH v6b 04/10] convert.c: ident + core.autocrlf didn't work tboegi
2016-04-24 15:11 ` [PATCH v6b 05/10] read-cache: factor out get_sha1_from_index() helper tboegi
2016-04-24 15:11 ` [PATCH v6b 06/10] convert.c: stream and early out tboegi
2016-04-24 15:11 ` [PATCH v6b 07/10] convert: unify the "auto" handling of CRLF tboegi
2016-04-24 15:11 ` [PATCH v6b 08/10] convert.c: more safer crlf handling with text attribute tboegi
2016-04-24 15:11 ` [PATCH v6b 09/10] t6038; use crlf on all platforms tboegi
2016-04-24 15:11 ` [PATCH v6b 10/10] ce_compare_data() did not respect conversion tboegi
2016-04-25 16:56 ` [PATCH v7 01/10] t0027: Make commit_chk_wrnNNO() reliable tboegi
2016-04-25 19:15 ` Junio C Hamano
2016-04-25 16:56 ` [PATCH v7 02/10] convert: allow core.autocrlf=input and core.eol=crlf tboegi
2016-04-25 16:56 ` [PATCH v7 03/10] t0027: test cases for combined attributes tboegi
2016-04-25 16:56 ` [PATCH v7 04/10] convert.c: ident + core.autocrlf didn't work tboegi
2016-04-25 16:56 ` [PATCH v7 05/10] read-cache: factor out get_sha1_from_index() helper tboegi
2016-04-25 16:56 ` [PATCH v7 06/10] convert.c: stream and early out tboegi
2016-04-25 16:56 ` [PATCH v7 07/10] convert: unify the "auto" handling of CRLF tboegi
2016-04-25 19:37 ` Junio C Hamano
2016-04-26 16:33 ` Torsten Bögershausen
2016-04-26 17:42 ` Junio C Hamano
2016-04-25 16:56 ` [PATCH v7 08/10] convert.c: more safer crlf handling with text attribute tboegi
2016-04-25 16:56 ` [PATCH v7 09/10] t6038; use crlf on all platforms tboegi
2016-04-25 16:56 ` [PATCH v7 10/10] ce_compare_data() did not respect conversion tboegi
2016-04-29 15:01 ` [PATCH v8 01/10] t0027: make commit_chk_wrnNNO() reliable tboegi
2016-04-29 15:01 ` [PATCH v8 02/10] convert: allow core.autocrlf=input and core.eol=crlf tboegi
2016-04-29 15:01 ` [PATCH v8 03/10] t0027: test cases for combined attributes tboegi
2016-04-29 15:01 ` [PATCH v8 04/10] convert.c: ident + core.autocrlf didn't work tboegi
2016-04-29 15:02 ` [PATCH v8 05/10] read-cache: factor out get_sha1_from_index() helper tboegi
2016-04-29 15:02 ` [PATCH v8 06/10] convert.c: stream and early out tboegi
2016-04-29 15:02 ` [PATCH v8 07/10] convert: unify the "auto" handling of CRLF tboegi
2016-11-25 15:48 ` Torsten Bögershausen
2016-11-27 16:22 ` [PATCH/RFC v1 1/1] New way to normalize the line endings tboegi
2016-11-29 19:15 ` Junio C Hamano
2017-04-12 11:48 ` [PATCH v2 1/1] Document how " tboegi
2016-04-29 15:02 ` [PATCH v8 08/10] convert.c: more safer crlf handling with text attribute tboegi
2016-04-29 15:02 ` [PATCH v8 09/10] t6038; use crlf on all platforms tboegi
2016-04-29 15:02 ` [PATCH v8 10/10] ce_compare_data() did not respect conversion tboegi
2016-04-29 18:20 ` Junio C Hamano
2016-04-29 21:09 ` Junio C Hamano
2016-05-01 16:27 ` Torsten Bögershausen
2016-05-02 18:16 ` Junio C Hamano
2016-05-02 19:33 ` Junio C Hamano
2016-05-03 16:02 ` Torsten Bögershausen
2016-05-03 18:31 ` Junio C Hamano
2016-05-04 4:07 ` Torsten Bögershausen
2016-05-04 7:23 ` Junio C Hamano
2016-05-06 8:54 ` Torsten Bögershausen
2016-05-06 17:11 ` Junio C Hamano
2016-05-07 6:10 ` [PATCH v9 0/6] convert-eol-autocrlf, old 5..10 now 1..6 tboegi
2016-05-07 6:10 ` [PATCH v9 1/6] read-cache: factor out get_sha1_from_index() helper tboegi
2016-05-09 19:54 ` Junio C Hamano
2016-05-07 6:11 ` [PATCH v9 2/6] convert.c: stream and early out tboegi
2016-05-09 20:29 ` Junio C Hamano
2016-05-11 4:30 ` Torsten Bögershausen
2016-05-07 6:11 ` [PATCH v9 3/6] convert: unify the "auto" handling of CRLF tboegi
2016-05-07 6:11 ` [PATCH v9 4/6] convert.c: more safer crlf handling with text attribute tboegi
2016-05-07 6:11 ` [PATCH v9 5/6] t6038; use crlf on all platforms tboegi
2016-05-07 6:11 ` [PATCH v9 6/6] convert: ce_compare_data() checks for a sha1 of a path tboegi
2016-02-11 16:16 ` [PATCH 2/3] Factor out convert_cmp_checkout() into convert.c tboegi
2016-02-11 16:16 ` [PATCH 3/3] convert.c: Optimize convert_cmp_checkout() for changed file len tboegi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq4maxz3lt.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=tboegi@web$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox