Re: [PATCH 4/7] t0027: optimize how we reset repository state
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 6, 2026, 17:33 UTC
- Message-ID
- <xmqqv769kgqa.fsf@gitster.g>
- In-Reply-To
- <20261106-pks-gitlab-ci-speedups-v1-4-1fa0374c7287@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 17 quoted lines
> 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
> - '
> - done
> + test_expect_success "setup checkout ${ceol:+ with -c core.eol=$ceol}" '
> + rm -f crlf_false_attr__LF.txt crlf_false_attr__CRLF.txt \
> + crlf_false_attr__LF_mix_CR.txt crlf_false_attr__CRLF_mix_LF.txt \
> + crlf_false_attr__LF_nul.txt &&
> + git ${ceol:+-c core.eol=$ceol} checkout -- \
> + crlf_false_attr__LF.txt crlf_false_attr__CRLF.txt \
> + crlf_false_attr__LF_mix_CR.txt crlf_false_attr__CRLF_mix_LF.txt \
> + crlf_false_attr__LF_nul.txt
> + 'Hmph, don't we want avoid hand-expand the list of files even though we may want to use one "rm -f" and another "git checkout" command to work on them? IOW,
paths=
for f in LF CRLF LF_mix_CR CRLF_mix_LF LF_nul
do
paths=${paths:+"$paths "}crlf_false_attr__$f.txt
done
test_expect_success "setup checkout ${ceol:+ with -c core.eol=$ceol}" '
rm -f $paths &&
git ${ceol:+-c core.eol=$ceol} checkout -- $paths
'or something?
> > test_expect_success "ls-files --eol attr=$attr $ident aeol=$aeol core.autocrlf=$crlf core.eol=$ceol" ' > test_when_finished "rm expect actual" &&