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

Re: [PATCH] fast-import: add 'ls' command

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Dec 2, 2010, 17:37 UTC
Message-ID
<20101202173722.GE3962@burratino>
In-Reply-To
<AANLkTi=HuPK+q_+hdkg4yK45UcoOA5PAGi4OmsojCsFa@mail.gmail.com>
Sverre Rabbelier wrote:
> On Thu, Dec 2, 2010 at 11:40, David Barr <david.barr@cordelta.com> wrote:
Show 9 quoted lines
>> There are two forms of the 'ls' command, one that takes a tree-ish and
>> one relative to the index. Allow the tree-ish variant to be used anywhere
>> a comment is allowed. Allow the index variant to be used within a commit
>> where file change commands would be used.
>
> The commit message doesn't explain why the index variant isn't allowed
> anywhere a comment is allowed. I assume that's because there's a
> half-constructed index if you're in the middle of a modify operation
> or such?

I somewhat agree. Actually I would go further: the word "index" brings to mind .git/index and its in-core counterpart, so at the same time as documenting it better, we might look into making it more self- explanatory. Maybe a syntax like

	ls current "path/to/entry"

would make it clearer that this is about directory entries in fast-import's active commit and not necessarily the usual index file?

I am not sure what syntax other vcs-es use for tree-ishes. To avoid name clashes (what if 'current' is the low-level name of a tree-ish?), an alternative might be

	ls-tree :11 "path/to/historical/entry"
	ls "path/to/current/entry"

Hm (just musing). Jonathan

Previous: David Michael BarrNext: Junio C Hamano
Message 5 of 24 in “fast-import: add 'ls' command”
  1. fast-import: add 'ls' commandDavid Barr, Dec 2, 2010
  2. fast-import: add 'ls' commandDavid Barr, Dec 2, 2010
  3. Sverre RabbelierDec 2, 2010
  4. David Michael BarrDec 2, 2010
  5. Jonathan NiederDec 2, 2010
  6. Junio C HamanoDec 2, 2010
  7. David BarrDec 2, 2010
  8. 0/3 fast-import: add 'ls' commandJonathan Nieder, Jan 3, 2011
  9. 1/3 fast-import: clarify handling of cat-blob featureJonathan Nieder, Jan 3, 2011
  10. 2/3 fast-import: treat filemodify with empty tree as deleteJonathan Nieder, Jan 3, 2011
  11. fast-import: treat filemodify with empty tree as deleteJonathan Nieder, Jan 26, 2011
  12. Sverre RabbelierJan 26, 2011
  13. fast-import: treat filemodify with empty tree as deleteJonathan Nieder, Jan 26, 2011
  14. Junio C HamanoJan 27, 2011
  15. Jonathan NiederJan 27, 2011
  16. fast-import: treat filemodify with empty tree as deleteJonathan Nieder, Jan 27, 2011
  17. Peter BaumannJan 27, 2011
  18. Jonathan NiederJan 27, 2011
  19. Peter BaumannJan 27, 2011
  20. Peter BaumannJan 27, 2011
  21. Jonathan NiederJan 28, 2011
  22. 3/3 fast-import: add 'ls' commandJonathan Nieder, Jan 3, 2011
  23. [RFC] fast-import: 'cat-blob' and 'ls' commandsJonathan Nieder, Jan 26, 2011
  24. Sam VilainJan 26, 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.