Thread View: linux.kernel.git
1 messages
1 total messages
Started by Junio C Hamano
Mon, 09 Nov 2026 16:59
Re: [PATCH v2 4/7] t0027: optimize how we reset repository state
Author: Junio C Hamano
Date: Mon, 09 Nov 2026 16:59
Date: Mon, 09 Nov 2026 16:59
35 lines
13905 bytes
13905 bytes
Patrick Steinhardt <ps@pks.im> writes:
> diff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh
> index 49dbf09da77..504a7ea54bb 100755
> --- a/t/t0027-auto-crlf.sh
> +++ b/t/t0027-auto-crlf.sh
> @@ -305,11 +305,12 @@ checkout_files () {
A micronit.
> pfx=eol_${ceol}_crlf_${crlf}_attr_${attr}_ &&
> for f in LF CRLF LF_mix_CR CRLF_mix_LF LF_nul
> do
> - test_expect_success "setup $f checkout ${ceol:+ with -c core.eol=$ceol}" '
> - rm -f crlf_false_attr__$f.txt &&
> - git ${ceol:+-c core.eol=$ceol} checkout -- crlf_false_attr__$f.txt
> - '
> + paths="${paths:+"$paths "}crlf_false_attr__$f.txt"
> done
We may know that nobody has touched variable "$paths" elsewhere in
this program, but I would prefer to have an explicit "let's start
with an empty $paths" assignment very close to this loop to help
future readers. That way they do not have to wonder and look all
over to find out after what string we are appending these filenames.
> + test_expect_success "setup checkout ${ceol:+ with -c core.eol=$ceol}" '
> + rm -f $paths &&
> + git ${ceol:+-c core.eol=$ceol} checkout -- $paths
> + '
>
> test_expect_success "ls-files --eol attr=$attr $ident aeol=$aeol core.autocrlf=$crlf core.eol=$ceol" '
> test_when_finished "rm expect actual" &&
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads