Re: [PATCH v2 1/3] t/lib-httpd: fix apply-one-time-script race under concurrent requests
- From
Michael Montalbo <mmontalbo@gmail.com>
- Date
- Aug 7, 2026, 16:29 UTC
- Message-ID
- <CAC2QwmK=K3EqvZWKQpy8ag+A8kMghNB6N=0dW7pjY1xJup4_Xg@mail.gmail.com>
- In-Reply-To
- <anGcwAZgbarxi6_k@pks.im>
On Tue, Aug 4, 2026 at 1:03 AM Patrick Steinhardt <ps@pks.im> wrote:
Show 12 quoted lines
> > > + > > +out=out.$$ > > +modified=out-modified.$$ > > +"$GIT_EXEC_PATH/git-http-backend" >"$out" > > + > > +if ./one-time-script "$out" 2>/dev/null >"$modified" && > > Is it intentional that we swallow stderr of this script now? We didn't > before. I assume that this is to swallow the error in case the script > got removed by the concurrent request? >
Yes, you are correct on both counts. This is an intentional change meant to swallow (an expected) stderr in case the script got removed already by a concurrent request, but that is not clear on its own. I will add an explanatory comment spelling this out.