On Tue, Mar 04, 2025 at 02:51:14AM -0500, Jeff King wrote: > From your reproduction, it looks like the issue is that for loose refs, > asking for_each_ref() to exclude "refs/heads/foo" will not yield > "refs/heads/foo/bar", but will yield "refs/heads/foo-bar". > > And that was true for packed-refs, too, before 59c35fac54 > (refs/packed-backend.c: implement jump lists to avoid excluded > pattern(s), 2023-07-10). After that, packed-refs exclude both. Oh, and of course it would be interesting to know how reftables behave here, too, as I think they recently learned about exclusions. -Peff