Re: [PATCH 1/8] t: fix races caused by background maintenance
Stefan Haller <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
On 20.02.26 11:15, Patrick Steinhardt wrote:
> Introduce a new `GIT_TEST_MAINT_AUTO_DETACH` environment variable that
> allows us to override the auto-detach behaviour and set that varibale in
> our tests.
I have just run into this problem with the lazygit test suite, and I
worked around it there by turning off auto maintenance altogether. Some
more details of how this affected us and why can be found in [1].
I'm fine with that solution, but I do wonder why we think this doesn't
also affect ordinary usage. Lazygit's integration test suite doesn't do
anything special, it simply executes git commands like a normal user
would. Maybe a bit faster than a normal user would type them, but for
scripts that create a bunch of files, stage them, and commit them, I see
no reason why they shouldn't run into the same problem. Or am I missing
something?
Thanks,
Stefan
[1] <https://github.com/jesseduffield/lazygit/pull/5898/
changes/4ec91a0bf58e07ce040f08600cd0c6b64f996e07>