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

Re: [PATCH] ls-tree path restriction semantics fixes

From
JMJason McMullan <jason.mcmullan@timesys.com>
Date
May 27, 2005, 19:26 UTC
Message-ID
<1117221986.11542.29.camel@jmcmullan.timesys>
In-Reply-To
<7vmzqgzg8a.fsf@assigned-by-dhcp.cox.net>
On Fri, 2005-05-27 at 11:16 -0700, Junio C Hamano wrote:
Show 7 quoted lines
> What you really want is something similar to '-d' flag to
> /bin/ls.  You are interested in the directory itself not its
> contents and I think your gripe is that giving a path that
> matches a tree always descends into it (i.e. there is no way to
> do the equivalent of "/bin/ls -d t").  I agree that it is a
> problem, but changing "/bin/ls t" not to show the directory
> contents of "t" is not a solution.
  git-ls-tree reporting just the tree's hash is valid, because if
you want everything in that tree, you can just do:
git-ls-tree `git-ls-tree HEAD path/dir | (read m t h n; echo $h)`
  I don't see the problem there.
Show 5 quoted lines
> JM> 	$ git-ls-tree t t
> JM> 	040000 tree 4eeb3990955b8badc4c14712b89d8cd9fff02f15    t
> 
> I do not know what you wanted to say in this example.  Your
> "Old" and "New" look the same to me.

The problem was that 't' and 't t' produced *vastly* different output in the old code. 't' would emit everything in the tree, and 't t' would only emit t's hash.

-- 
Jason McMullan <jason.mcmullan@timesys.com>
TimeSys Corporation
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 7 in “ls-tree path restriction semantics fixes”
  1. ls-tree path restriction semantics fixesJason McMullan, May 27, 2005
  2. Junio C HamanoMay 27, 2005
  3. Jason McMullanMay 27, 2005
  4. Junio C HamanoMay 28, 2005
  5. Rewrite ls-tree to behave more like "/bin/ls -a"Junio C Hamano, May 28, 2005
  6. Jason McMullanMay 28, 2005
  7. Junio C HamanoMay 29, 2005

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.