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

Re: [RFC PATCH] ls-tree: dump full tree if it was named as such

From
Thomas Rast <trast@student.ethz.ch>
Date
Feb 14, 2010, 16:33 UTC
Message-ID
<201002141733.53137.trast@student.ethz.ch>
In-Reply-To
<7vpr4fo85r.fsf@alter.siamese.dyndns.org>

[I noticed only just now that you only sent this to me. Accidentally I suppose?]

On Monday 08 February 2010 20:10:40 Junio C Hamano wrote:
Show 19 quoted lines
> 
> This obviously was meant to be used with the full tree recorded by a
> commit and what you are seeing (e.g. cd to "valgrind" that is not even
> tracked, and pretend HEAD:t were the full contents---the full contents of
> the tree limited to the work tree location "valgrind" is shown) is an
> artifact of that.
> 
> I think the right solution is along the lines of --full-tree option to
> allow people (i.e. scripts) to ask for the exact tree contents without any
> funny path limiting based on the location in the work tree.  They can
> apply whatever path limiting from the command line, e.g. by running
> 
>     git ls-tree --full-tree HEAD:t valgrind
> 
> instead of running
> 
>     mkdir -p valgrind && cd valgrind && git ls-tree HEAD:t
> 
> when they want to apply path limit to the ls-tree output.

I guess in the (very) long run, the scripts should be forced to always use --full-tree so that we can eventually make it the default?

I'm just not sure how the existing behaviour could ever be useful, though admittedly 'git ls-tree $(git write-tree)' would change semantics if you're in a subdirectory.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Thomas RastNext: Junio C Hamano
Message 2 of 3 in “ls-tree: dump full tree if it was named as such”
  1. ls-tree: dump full tree if it was named as suchThomas Rast, Feb 8, 2010
  2. Thomas RastFeb 14, 2010
  3. Junio C HamanoFeb 15, 2010

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.