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

Re: [PATCH v2 1/2] refs.c: remove empty '--exclude' patterns

From
Taylor Blau <me@ttaylorr.com>
Date
Mar 7, 2025, 23:37 UTC
Message-ID
<Z8uDMHclfE+KqBMz@nand.local>
In-Reply-To
<CABPp-BE3u=YVCU20Bz4jZc90DkmArE=v02WjOzr-uO6kV6Zfng@mail.gmail.com>
On Fri, Mar 07, 2025 at 01:32:49PM -0800, Elijah Newren wrote:
> Makes sense...but doesn't the second patch also fix this issue without
> the first patch being needed?

It does, but the mechanism is pretty round-about. (From a quick glance we'll turn the empty pattern "" into "/" which won't match anything, and thus won't contribute to the jump list).

But there are a couple of reasons to keep this patch. Most importantly, it hardens us against potential future regressions here with the empty pattern. And it makes dealing with that case much more explicit by throwing those patterns out before they make their way to the backends instead of the quirk above.

Thanks, Taylor

Previous: Elijah NewrenNext: Elijah Newren
Message 9 of 17 in “refs: a couple of --exclude fixes”
  1. 0/2 refs: a couple of --exclude fixesTaylor Blau, Mar 6, 2025
  2. 1/2 refs.c: remove empty '--exclude' patternsTaylor Blau, Mar 6, 2025
  3. 2/2 refs.c: unify '--exclude' behavior between files and packed backendsTaylor Blau, Mar 6, 2025
  4. Patrick SteinhardtMar 6, 2025
  5. Taylor BlauMar 6, 2025
  6. 0/2 refs: a couple of --exclude fixesTaylor Blau, Mar 6, 2025
  7. 1/2 refs.c: remove empty '--exclude' patternsTaylor Blau, Mar 6, 2025
  8. Elijah NewrenMar 7, 2025
  9. Taylor BlauMar 7, 2025
  10. Elijah NewrenMar 7, 2025
  11. 2/2 refs.c: stop matching non-directory prefixes in exclude patternsTaylor Blau, Mar 6, 2025
  12. Junio C HamanoMar 6, 2025
  13. Patrick SteinhardtMar 7, 2025
  14. Junio C HamanoMar 7, 2025
  15. Taylor BlauMar 7, 2025
  16. Elijah NewrenMar 7, 2025
  17. Taylor BlauMar 7, 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.