Re: [PATCH v2] pack-bitmap: gracefully handle missing BTMP chunks
On Tue, Apr 16, 2024 at 01:12:32AM -0400, Jeff King wrote:
Show 17 quoted lines
> On Tue, Apr 16, 2024 at 06:47:51AM +0200, Patrick Steinhardt wrote:
>
> > > > + GIT_TEST_MIDX_READ_BTMP=false git -c pack.allowPackReuse=$allow_pack_reuse \
> > > > + pack-objects --all --use-bitmap-index --stdout </dev/null >/dev/null 2>err &&
> > >
> > > A small note here, but setting stdin to read from /dev/null is
> > > unnecessary with `--all.`
> >
> > Is it really? Executing `git pack-objects --all --stdout` on my system
> > blocks until stdin is closed. It _seems_ to work in the tests alright,
> > but doesn't work outside of them. Which is puzzling on its own.
>
> Inside a test_expect block, stdin is already redirected from /dev/null.
> See 781f76b158 (test-lib: redirect stdin of tests, 2011-12-15).
>
> I do think it's still good practice to redirect from /dev/null
> explicitly to indicate the intent.
Ah, that explains. Thanks!
Patrick