Re: [PATCH v2] pack-bitmap: gracefully handle missing BTMP chunks
- From
Jeff King <peff@peff.net>
- Date
- Apr 16, 2024, 05:12 UTC
- Message-ID
- <20240416051232.GA1745631@coredump.intra.peff.net>
- In-Reply-To
- <Zh4C9xhOC4BVslyX@tanuki>
On Tue, Apr 16, 2024 at 06:47:51AM +0200, Patrick Steinhardt wrote:
Show 9 quoted lines
> > > + 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.
-Peff