Re: [PATCH v4 02/16] ref-filter.h: provide `REF_FILTER_INIT`
- From
Jeff King <peff@peff.net>
- Date
- Jul 3, 2023, 05:15 UTC
- Message-ID
- <20230703051504.GB3502534@coredump.intra.peff.net>
- In-Reply-To
- <7ce82b6a5a451ff183ba8d35fc0f50acccee8972.1687270849.git.me@ttaylorr.com>
On Tue, Jun 20, 2023 at 10:21:06AM -0400, Taylor Blau wrote:
Show 7 quoted lines
> From: Jeff King <peff@peff.net> > > Provide a sane initialization value for `struct ref_filter`, which in a > subsequent patch will be used to initialize a new field. > > In the meantime, fix a case in test-reach.c where its `ref_filter` is > not even zero-initialized.
This test-reach case scared me, but it happens to work now because commit_contains() only looks at the one field that we set. So we're not fixing a bug, but more like a bug waiting to happen. :)
-Peff