From: Eric Sunshine Date: Mon, 02 Jul 2018 21:30:05 GMT Subject: Re: [PATCH 3/3] ref-filter: avoid backend filtering with --ignore-case Message-ID: In-Reply-To: <20180702211242.GC23324@sigill.intra.peff.net> On Mon, Jul 2, 2018 at 5:12 PM Jeff King wrote: > When for-each-ref is used with --ignore-case, we expect > match_name_as_path() to do a case-insensitive match. But > there's an extra layer of filtering that happens before we > even get there. Since commit cfe004a5a9 (ref-filter: limit > traversal to prefix, 2017-05-22), we feed the prefix to the > ref backend so that it can optimize the ref iteration. > > There's no mechanism for us to tell the backend we're > matching case-insensitively. And nor is there likely to be Perhaps: s/And nor/nor/ > one anytime soon, since the packed backend relies on > binary-searching the sorted list of refs. Let's just punt on > this case. The extra filtering is an optimization that we > simply can't do. We'll still give the correct answer via the > filtering in match_name_as_path(). > > Signed-off-by: Jeff King