git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] ref-filter: avoid backend filtering with --ignore-case

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 2, 2018, 21:30 UTC
Message-ID
<CAPig+cSJrZi+rVgJp3Yhbc=F2yyooGw7a046e-KKiE++3CiP3w@mail.gmail.com>
In-Reply-To
<20180702211242.GC23324@sigill.intra.peff.net>
On Mon, Jul 2, 2018 at 5:12 PM Jeff King <peff@peff.net> wrote:
Show 9 quoted lines
> 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/
Show 7 quoted lines
> 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 <peff@peff.net>
Previous: Jeff King
Message 5 of 5 in “un-break for-each-ref --ignore-case”
  1. 0/3 un-break for-each-ref --ignore-caseJeff King, Jul 2, 2018
  2. 1/3 t6300: add a test for --ignore-caseJeff King, Jul 2, 2018
  3. 2/3 for-each-ref: consistently pass WM_IGNORECASE flagJeff King, Jul 2, 2018
  4. 3/3 ref-filter: avoid backend filtering with --ignore-caseJeff King, Jul 2, 2018
  5. Eric SunshineJul 2, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.