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

[PATCH v2 0/2] fix "foo**/bar" matching "foobar"

From
Jeff King <peff@peff.net>
Date
Oct 26, 2025, 15:40 UTC
Message-ID
<20251026154036.GA2173430@coredump.intra.peff.net>
In-Reply-To
<20251026152614.GB2095501@coredump.intra.peff.net>
On Sun, Oct 26, 2025 at 11:26:14AM -0400, Jeff King wrote:
> Me too. I wrote it a few different ways before ending up with the "==
> 1", just because it made the diff smaller. But let me do it as two
> steps, which I think will make it all more clear.

Here it is. Maybe excessive to split it up, but each patch is quite nice to read now. :)

  [1/2]: match_pathname(): reorder prefix-match check
  [2/2]: match_pathname(): give fnmatch one char of prefix context
 dir.c              | 18 ++++++++++++------
 t/t0008-ignores.sh | 11 +++++++++++
 2 files changed, 23 insertions(+), 6 deletions(-)
-Peff
Previous: Jeff KingNext: Jeff King
Message 9 of 20 in “Probable issue with code/documentation”
  1. Sruteesh KumarOct 10, 2025
  2. match_pathname(): give fnmatch one char of prefix contextJeff King, Oct 14, 2025
  3. Jeff KingOct 14, 2025
  4. Sruteesh KumarOct 22, 2025
  5. Junio C HamanoOct 23, 2025
  6. Sruteesh KumarOct 24, 2025
  7. Jeff KingOct 26, 2025
  8. Jeff KingOct 26, 2025
  9. 0/2 fix "foo**/bar" matching "foobar"Jeff King, Oct 26, 2025
  10. 1/2 match_pathname(): reorder prefix-match checkJeff King, Oct 26, 2025
  11. 2/2 match_pathname(): give fnmatch one char of prefix contextJeff King, Oct 26, 2025
  12. Junio C HamanoOct 26, 2025
  13. Jeff KingOct 27, 2025
  14. Junio C HamanoOct 27, 2025
  15. Jeff KingOct 28, 2025
  16. doc: document backslash in gitignore patternsJeff King, Oct 29, 2025
  17. Jeff KingOct 29, 2025
  18. D. Ben KnobleOct 30, 2025
  19. Jeff KingOct 30, 2025
  20. Ben KnobleOct 30, 2025

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.