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

Re: [PATCH v2 6/6] refs/reftable: wire up support for exclude patterns

From
Taylor Blau <me@ttaylorr.com>
Date
Sep 17, 2024, 09:53 UTC
Message-ID
<ZulRrH2Pgrv/Cr/X@nand.local>
In-Reply-To
<ZulOLLdh1_jrYcN2@pks.im>
On Tue, Sep 17, 2024 at 11:39:04AM +0200, Patrick Steinhardt wrote:
Show 9 quoted lines
> > Ugh, I just read the next hunk below, so ignore me here ;-).
>
> ;)
>
> I was also wondering whether we'd want to amend the generic parts of the
> refs interface to filter out globs. But it is entirely feasible that a
> backend can indeed filter out globs efficiently, even though none of the
> current ones can. So it kind of makes sense to keep things as-is and let
> the backends themselves decide what they can use.
Yep, agreed.
Show 15 quoted lines
> > One question I had reading this is why we don't filter these out on the
> > fly in the iterator itself instead of allocating a separate array that
> > we have to xstrdup() into and free later on.
> >
> > We may be at the point of diminishing returns here, but I wonder if
> > allocating this thing is more expensive than a few redundant strcmp()s
> > and calls to is_glob_special(). I dunno.
>
> I think duplicating the array is the right thing to do anyway to not get
> weird lifetime issues with the exclude patterns. A caller may set up a
> ref iterator that they may end up using for longer than they keep alive
> the exlude patterns passed to the iterator. So by duplicating the array
> we might end up wasting a bit of memory, but we avoid such lifetime
> problems completely, which I think is a win to make the infrastructure
> less fragile.

OK, I trust your judgement here over my own as not having nearly the familiarity with reftables as you do.

Thanks, Taylor

Previous: Patrick SteinhardtNext: karthik nayak
Message 35 of 36 in “refs/reftable: wire up exclude patterns”
  1. 0/6 refs/reftable: wire up exclude patternsPatrick Steinhardt, Sep 9, 2024
  2. 1/6 refs: properly apply exclude patterns to namespaced refsPatrick Steinhardt, Sep 9, 2024
  3. karthik nayakSep 13, 2024
  4. Patrick SteinhardtSep 16, 2024
  5. 2/6 builtin/receive-pack: fix exclude patterns when announcing refsPatrick Steinhardt, Sep 9, 2024
  6. karthik nayakSep 13, 2024
  7. 3/6 Makefile: stop listing test library objects twicePatrick Steinhardt, Sep 9, 2024
  8. 4/6 t/unit-tests: introduce reftable libraryPatrick Steinhardt, Sep 9, 2024
  9. 5/6 reftable/reader: make table iterator reseekablePatrick Steinhardt, Sep 9, 2024
  10. karthik nayakSep 13, 2024
  11. Patrick SteinhardtSep 16, 2024
  12. karthik nayakSep 17, 2024
  13. 6/6 refs/reftable: wire up support for exclude patternsPatrick Steinhardt, Sep 9, 2024
  14. karthik nayakSep 13, 2024
  15. Patrick SteinhardtSep 16, 2024
  16. karthik nayakSep 17, 2024
  17. karthik nayakSep 13, 2024
  18. Patrick SteinhardtSep 16, 2024
  19. 0/6 refs/reftable: wire up exclude patternsPatrick Steinhardt, Sep 16, 2024
  20. 1/6 refs: properly apply exclude patterns to namespaced refsPatrick Steinhardt, Sep 16, 2024
  21. Taylor BlauSep 17, 2024
  22. Patrick SteinhardtSep 17, 2024
  23. Taylor BlauSep 17, 2024
  24. Patrick SteinhardtSep 17, 2024
  25. Taylor BlauSep 17, 2024
  26. Patrick SteinhardtSep 17, 2024
  27. 2/6 builtin/receive-pack: fix exclude patterns when announcing refsPatrick Steinhardt, Sep 16, 2024
  28. Taylor BlauSep 17, 2024
  29. 3/6 Makefile: stop listing test library objects twicePatrick Steinhardt, Sep 16, 2024
  30. 4/6 t/unit-tests: introduce reftable libraryPatrick Steinhardt, Sep 16, 2024
  31. 5/6 reftable/reader: make table iterator reseekablePatrick Steinhardt, Sep 16, 2024
  32. 6/6 refs/reftable: wire up support for exclude patternsPatrick Steinhardt, Sep 16, 2024
  33. Taylor BlauSep 17, 2024
  34. Patrick SteinhardtSep 17, 2024
  35. Taylor BlauSep 17, 2024
  36. karthik nayakSep 17, 2024

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.