Re: [PATCH] fast-import: add 'ls' command
From: David Michael Barr <hidden>
Date: 2016-06-15 22:50:09
Hi Sverre,
quoted
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?
The index variant is allowed between file change commands, at which the index should be consistent albeit deferred for hashing. I believe this is the only place where there's naturally an implicit active tree. Simply, "relative to the index" only makes sense when describing a commit. Unfortunately, the list server dropped my summary email :( The patch was supposed to be marked as a RFC and I gave an outline of the intended use. The key features I need for svn-fe are access to the index for the current commit and access to the content of older marked commits. NB: This version doesn't support unquoted paths. -- David Barr