From: "Torsten Bögershausen" <tboegi@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Patrick Steinhardt <ps@pks.im>,
git@vger.kernel.org,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH 4/7] t0027: optimize how we reset repository state
Date: Sun, 8 Nov 2026 17:49:01 +0100 [thread overview]
Message-ID: <20261108164901.GA29213@tb-raspi4> (raw)
In-Reply-To: <xmqqv769kgqa.fsf@gitster.g>
On Fri, Nov 06, 2026 at 09:33:01AM -0800, Junio C Hamano wrote:
> 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
> '
"Wow, so it can go" - a well working, but slow code is speed up so much.
I used the following (before reading the suggestion from Junio)
and the execution time here on an older MacOs dropped from 71 seconds to 54 seconds.
test_expect_success "setup file checkout ${ceol:+ with -c core.eol=$ceol}" '
files="\
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" &&
rm -fv $files &&
git ${ceol:+-c core.eol=$ceol} checkout -- $files
'
next prev parent reply other threads:[~2026-11-08 16:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 10:30 [PATCH 0/7] ci: some speedups for slow tests Patrick Steinhardt
2026-11-06 10:30 ` [PATCH 1/7] gitlab-ci: speed up installation of Git for Windows SDK Patrick Steinhardt
2026-11-06 17:20 ` Junio C Hamano
2026-11-06 10:30 ` [PATCH 2/7] gitlab-ci: exclude intermediate outputs from Windows artifacts Patrick Steinhardt
2026-11-06 10:30 ` [PATCH 3/7] ci: build optimized binaries with Meson Patrick Steinhardt
2026-11-06 17:24 ` Junio C Hamano
2026-11-06 10:30 ` [PATCH 4/7] t0027: optimize how we reset repository state Patrick Steinhardt
2026-11-06 17:33 ` Junio C Hamano
2026-11-08 16:49 ` Torsten Bögershausen [this message]
2026-11-06 10:30 ` [PATCH 5/7] t0027: cache expected output files Patrick Steinhardt
2026-11-06 10:30 ` [PATCH 6/7] t1092: set up repositories from templates Patrick Steinhardt
2026-11-06 10:30 ` [PATCH 7/7] t5551: use reftables for repositories with many refs Patrick Steinhardt
2026-11-06 17:39 ` [PATCH 0/7] ci: some speedups for slow tests Junio C Hamano
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=20261108164901.GA29213@tb-raspi4 \
--to=tboegi@web.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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