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

Re: git-ls-files -l

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Dec 30, 2008, 20:32 UTC
Message-ID
<alpine.LFD.2.00.0812301226110.3082@localhost.localdomain>
In-Reply-To
<m3wsdiaptg.fsf@localhost.localdomain>
On Tue, 30 Dec 2008, Jakub Narebski wrote:
Show 5 quoted lines
> 
> I think it would be easy to add '-l' also to git-ls-files. Please
> remember to provide size only for blobs, as provoding size for trees
> would make it harder to change to future packv4, where tree objects
> would be stored deconstructed.

Personally, more than "git ls-files -l", I've occasionally wanted a real "git ls" that really looks more like "ls". That includes:

 - turning a list of files in a subdirectory into a "directory" entry 
   (which is not very natural for "git ls-files" as an index operation, 
   since the index is fundamentally flat).
 - yes, adding "-l" as an option, but really showing the stat information. 
   Right now, you can do "git ls-files --stage", and it will show a kind 
   of extended information, but while it shows the mode, it doesn't show 
   the owner/timestamp/etc parts of the index, and those are sometimes 
   interesting.

Btw, the "ls-tree -l" format is not nice. Don't use it as a basis to pattern "ls -l" (or if you want to just extend ls-tree, whatever).

			Linus
Previous: Jakub NarebskiNext: Jakub Narebski
Message 3 of 4 in “git-ls-files -l”
  1. jidanni@jidanni.orgDec 29, 2008
  2. Jakub NarebskiDec 30, 2008
  3. Linus TorvaldsDec 30, 2008
  4. Jakub NarebskiDec 30, 2008

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.