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

Re: [PATCH v3 0/2] bringing attributes to pathspecs

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 21, 2017, 15:51 UTC
Message-ID
<xmqqr31qsk4s.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CACsJy8BRTuH=xv_xvQPOkVaRcMXKnjgT77SXkwLkZ6aAvcTyHg@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 11 quoted lines
> The series updated match_pathspec(), but that's only one of two
> pathspec filtering functions. The other is tree_entry_interesting()
> (e.g. for "git grep <tree>"). Do you have plans to support :(attr)
> there too? "No" is a perfectly fine answer (and it will end up in my
> forever growing backlog).
>
> The thing about tree_entry_interesting() is, we would want to stop
> traversing subtrees as soon as possible. Naively implemented, we would
> need to traverse all subtrees so we can call match_attrs(). That's not
> great. Oii I'm rambling.. I don't know yet how to implement this thing
> efficiently.
Thanks for great insights.  

It indeed will become issue when an overly broad pathspec pattern is combined with an attribute requirement, e.g. ".:(attr=X)", and we may have to devise a way to tell that there won't be any paths with that satisfy the attribute requirement before descending into a tree as an optimization.

Previous: Duy NguyenNext: Brandon Williams
Message 22 of 23 in “bringing attributes to pathspecs”
  1. 0/2 bringing attributes to pathspecsBrandon Williams, Mar 9, 2017
  2. 1/2 pathspec: allow querying for attributesBrandon Williams, Mar 9, 2017
  3. Jonathan TanMar 9, 2017
  4. Brandon WilliamsMar 10, 2017
  5. Junio C HamanoMar 13, 2017
  6. Stefan BellerMar 13, 2017
  7. 2/2 pathspec: allow escaped query valuesBrandon Williams, Mar 9, 2017
  8. Jonathan TanMar 9, 2017
  9. Brandon WilliamsMar 10, 2017
  10. Stefan BellerMar 9, 2017
  11. 0/2 bringing attributes to pathspecsBrandon Williams, Mar 10, 2017
  12. 1/2 pathspec: allow querying for attributesBrandon Williams, Mar 10, 2017
  13. Jonathan TanMar 10, 2017
  14. Brandon WilliamsMar 11, 2017
  15. 2/2 pathspec: allow escaped query valuesBrandon Williams, Mar 10, 2017
  16. 0/2 bringing attributes to pathspecsBrandon Williams, Mar 13, 2017
  17. 1/2 pathspec: allow querying for attributesBrandon Williams, Mar 13, 2017
  18. 2/2 pathspec: allow escaped query valuesBrandon Williams, Mar 13, 2017
  19. Junio C HamanoMar 13, 2017
  20. Brandon WilliamsMar 13, 2017
  21. Duy NguyenMar 21, 2017
  22. Junio C HamanoMar 21, 2017
  23. Brandon WilliamsMar 21, 2017

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.