Re: [PATCH v2 5/8] repack: add `--filter=<filter-spec>` option
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Aug 9, 2023, 20:38 UTC
- Message-ID
- <ZNP5RNJgTU698ra6@nand.local>
- In-Reply-To
- <CAP8UFD1eX8JMd91Say_sC7h_V08oRq32Wu9RM+SFtAQnhRPO2w@mail.gmail.com>
On Tue, Aug 08, 2023 at 10:45:48AM +0200, Christian Couder wrote:
Show 28 quoted lines
> On Wed, Jul 26, 2023 at 1:09 AM Junio C Hamano <gitster@pobox.com> wrote: > > > > Junio C Hamano <gitster@pobox.com> writes: > > > > > Thanks for walking through the codepaths involved. We are good > > > then. > > > > Sorry, but not so fast. > > > > https://github.com/git/git/actions/runs/5661445152 (seen with this topic) > > https://github.com/git/git/actions/runs/5662517690 (seen w/o this topic) > > > > The former fails t7700 in the linux-TEST-vars job, while the latter > > passes the same job. > > I think this was because I added the following test: > > +test_expect_success '--filter fails with --write-bitmap-index' ' > + test_must_fail git -C bare.git repack -a -d --write-bitmap-index \ > + --filter=blob:none && > + > + git -C bare.git repack -a -d --no-write-bitmap-index \ > + --filter=blob:none > +' > > which fails because in the linux-TEST-vars job the > GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP env variable is set to 1 and > this counteracts the `--write-bitmap-index` option.
Makes sense. That linux-TEST-vars job always seems to get me, too.
(As an aside, and definitely not related to your patch here, I wonder if we should consider dropping some of the older TEST variables that belong to features that we no longer consider experimental).
Show 10 quoted lines
> I have tried to fix it like this: > > +test_expect_success '--filter fails with --write-bitmap-index' ' > + GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=0 test_must_fail git -C > bare.git repack \ > + -a -d --write-bitmap-index --filter=blob:none > +' > > but I haven't been able to check that this works on CI as all the job > seems to fail these days before they even start:
I think the cannonical way to do this is with env, like so:
test_must_fail env GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=0 \
git -C bare.git repack -ad --write-bitmap-index --filter=blob:none 2>errThanks, Taylor