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

Re: Relative ls-files

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Mar 23, 2011, 11:42 UTC
Message-ID
<4D89DCBE.3060400@drmicha.warpmail.net>
In-Reply-To
<AANLkTimdLGgGXGRNVH5+X-cnhK2NWfWx9k0apt-6rr1Z@mail.gmail.com>
demerphq venit, vidit, dixit 23.03.2011 12:28:
Show 17 quoted lines
> On 23 March 2011 12:27, John Tapsell <johnflux@gmail.com> wrote:
>> On 23 March 2011 10:49, Michael J Gruber <git@drmicha.warpmail.net> wrote:
>>> John Tapsell venit, vidit, dixit 23.03.2011 11:33:
>>>> Hi,
>>>>
>>>>   Could someone add a feature to  ls-files  to list all the files in
>>>> the repository, but relative to the current path?  It would be useful
>>>> for many different aliases, such as "git locate".
>>>
>>> That is in the works, we just have to decide between two suggested
>>> notations:
>>>
>>> git ls-files :
>>> git ls-files :/
>>
>>
>> What's wrong with --relative  or something?
??

ls-files already lists files relative to cwd. What you need is a way to specify that you want all files, not just those beneath cwd.

>>
>> I've never liked magical strange notations.  ":" already has a meaning.
> 
> +1

I think you've both been missing out on the discussions about --full-tree and refspec notation for that...

Of course ":" has a meaning. "git show HEAD:" lists all files at the top-level of the tree at HEAD. That is exactly why ":" has been suggested to denote the top-level for pathspecs also. Note that this is much more general than just an option for ls-files.

Michael
Previous: demerphqNext: Martin Langhoff
Message 5 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.