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

Re: Relative ls-files

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Mar 23, 2011, 15:41 UTC
Message-ID
<AANLkTin=y=THaQEzgMhyBVLBriJBCa-pVvONXDnzUmew@mail.gmail.com>
In-Reply-To
<7v39mdhni3.fsf@alter.siamese.dyndns.org>
On Wed, Mar 23, 2011 at 10:20 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 20 quoted lines
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
>
>> (off topic?)
>>
>> "ls-tree -r" does not understand wildcards. Maybe it should not, but I
>> think read_tree_recursive() should use tree_entry_interesting(). The
>> function it uses for matching, match_tree_entry, looks like another
>> variant of t_e_interesting.
>
> I thought that you already did that within the scope of your earlier
> topic.
>
> "ls-tree" is quite a low-level plumbing, and until we absolutely know that
> all the old scripts people wrote relying on its original behaviour are
> extinct, we shouldn't touch it without a reasonable breakage protection.
>
> It is Ok to give it a command line option to make it in line with other
> pathspec users, namely, that causes the command to missing pathspec should
> automatically mean the whole tree and to honor globs.  No existing script
> would be using that option, so that is a safe thing to do.

This read_tree_recursive() affects 'archive' and 'checkout -- paths' (ie. no wildcard awareness). I will probably move match_tree_entry() to ls-tree.c to preserve its behavior, then change read_tree_recursive() to use tree_entry_interesting().

-- 
Duy
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 28 in “Relative ls-files”
  1. John TapsellMar 23, 2011
  2. Michael J GruberMar 23, 2011
  3. John TapsellMar 23, 2011
  4. demerphqMar 23, 2011
  5. Michael J GruberMar 23, 2011
  6. Martin LanghoffMar 23, 2011
  7. Junio C HamanoMar 23, 2011
  8. Nguyen Thai Ngoc DuyMar 23, 2011
  9. Junio C HamanoMar 23, 2011
  10. Nguyen Thai Ngoc DuyMar 23, 2011
  11. Junio C HamanoMar 23, 2011
  12. Nguyen Thai Ngoc DuyMar 24, 2011
  13. 1/2 Reimplement read_tree_recursive() using tree_entry_interesting()Nguyễn Thái Ngọc Duy, Mar 24, 2011
  14. 2/2 Convert read_tree{,_recursive} to support struct pathspecNguyễn Thái Ngọc Duy, Mar 24, 2011
  15. Nguyen Thai Ngoc DuyMar 24, 2011
  16. Junio C HamanoMar 24, 2011
  17. Junio C HamanoMar 24, 2011
  18. Junio C HamanoMar 24, 2011
  19. 1/3 Reimplement read_tree_recursive() using tree_entry_interesting()Nguyễn Thái Ngọc Duy, Mar 25, 2011
  20. 2/3 Convert read_tree{,_recursive} to support struct pathspecNguyễn Thái Ngọc Duy, Mar 25, 2011
  21. 3/3 Improve tree_entry_interesting() handling codeNguyễn Thái Ngọc Duy, Mar 25, 2011
  22. Junio C HamanoMar 24, 2011
  23. Martin LanghoffMar 23, 2011
  24. Junio C HamanoMar 23, 2011
  25. Junio C HamanoMar 23, 2011
  26. Junio C HamanoMar 23, 2011
  27. Michael J GruberMar 23, 2011
  28. Nguyen Thai Ngoc DuyMar 23, 2011

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.