On Tue, Jan 27, 2026 at 9:33 AM Mike Rapoport <[email protected]> wrote:
> On Thu, Jan 22, 2026 at 09:44:27PM +0000, Jordan Richards wrote:

> > diff --git a/tools/testing/selftests/liveupdate/.gitignore 
> > b/tools/testing/selftests/liveupdate/.gitignore
> > index 661827083ab6..7dc1e8aec44c 100644
> > --- a/tools/testing/selftests/liveupdate/.gitignore
> > +++ b/tools/testing/selftests/liveupdate/.gitignore
> > @@ -6,4 +6,6 @@
> >  !*.sh
> >  !.gitignore
> >  !config
> > +!config.aarch64
> > +!config.x86_64

This could be:

  !config.*

> >  !Makefile
>
> Hmm, I missed it when tools/testing/selftests/liveupdate/ was posted.
> I'm not a huge fun of negative logic in .gitignore.
> Why can't we just exclude the patterns we don't want to track?

I'm pretty sure this came from me. It's the pattern we use for VFIO
and KVM selftests .gitignore.

Positive logic requires updating .gitignore for every new executable
(every new selftest). Negative logic requires updating .gitignore for
every new one-off files that don't match the existing negative logic.
In my experience with selftests, the former happens more frequently
than the latter, so the negative logic is easier to maintain.

Reply via email to