Thread (1 message) 1 message, 1 author, 2024-10-08

Re: [PATCH] builtin/gc: fix crash when running `git maintenance start`

From: Junio C Hamano <hidden>
Date: 2024-10-08 18:33:42

Patrick Steinhardt [off-list ref] writes:
So why didn't we catch this trivial regression? The reason is that our
tests always set up the "GIT_TEST_MAINT_SCHEDULER" environment variable
via "t/test-lib.sh", which allows us to override the scheduler command
with a custom one so that we don't accidentally modify the developer's
system. But the faulty code where we don't set the `out` parameter will
only get hit in case that environment variable is _not_ set, which is
never the case when executing our tests.

Fix the regression by again unconditionally allocating the value in the
`out` parameter, if provided. Add a test that unsets the environment
variable to catch future regressions in this area.

Reported-by: Shubham Kanodia <redacted>
Signed-off-by: Patrick Steinhardt <redacted>
---
Thanks for quickly reporting and addressing this one, both of you.

Will queue.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help