Re: [PATCH v2 8/8] midx: read `RIDX` chunk when present
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jan 4, 2022, 15:21 UTC
- Message-ID
- <YdRmFRHNeOGcSwJ0@nand.local>
- In-Reply-To
- <92d50859-ecfa-e7c5-d68b-d90a11579cd0@gmail.com>
On Mon, Dec 20, 2021 at 01:42:24PM -0500, Derrick Stolee wrote:
Show 14 quoted lines
> > diff --git a/t/t5326-multi-pack-bitmaps.sh b/t/t5326-multi-pack-bitmaps.sh
> > index 100ac90d15..8c92acb0ce 100755
> > --- a/t/t5326-multi-pack-bitmaps.sh
> > +++ b/t/t5326-multi-pack-bitmaps.sh
> > @@ -9,6 +9,11 @@ test_description='exercise basic multi-pack bitmap functionality'
> > GIT_TEST_MULTI_PACK_INDEX=0
> > GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=0
> >
> > +GIT_TEST_MIDX_WRITE_REV=0
> > +GIT_TEST_MIDX_READ_RIDX=1
> > +export GIT_TEST_MIDX_WRITE_REV
> > +export GIT_TEST_MIDX_READ_RIDX
>
> Technically, we could unset these variables, right? ("...=")We absolutely could, and I can't think of any reason not to (other than these tests would be fragile with respect to the default values of these special "GIT_TEST_" environment variables, but these are unlikely to change ever).
Show 22 quoted lines
> > diff --git a/t/t5327-multi-pack-bitmaps-rev.sh b/t/t5327-multi-pack-bitmaps-rev.sh > ... > > +# We'll be writing our own midx and bitmaps, so avoid getting confused by the > > +# automatic ones. > > +GIT_TEST_MULTI_PACK_INDEX=0 > > +GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=0 > > + > > +# Unlike t5326, this test exercise multi-pack bitmap functionality where the > > +# object order is stored in a separate .rev file. > > +GIT_TEST_MIDX_WRITE_REV=1 > > +GIT_TEST_MIDX_READ_RIDX=0 > > +export GIT_TEST_MIDX_WRITE_REV > > +export GIT_TEST_MIDX_READ_RIDX > > + > > +midx_bitmap_core rev > > +midx_bitmap_partial_tests rev > > + > > +test_done > > Nice that now we get the payoff of the test refactor. This new script exists > only to verify that we can still read the old .rev files, which is important > for compatibility.
Exactly. Though I certainly wavered on testing the legacy .rev behavior as much as I did. But that had much more to do with how awkward the tests came out. That behavior is important enough IMHO that it's worth the awkwardness.
Thanks, Taylor