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

Re: ls-tree and wildcards

From
Junio C Hamano <gitster@pobox.com>
Date
May 14, 2012, 16:43 UTC
Message-ID
<7vbolqiuh1.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4FAE7CBD.3020605@rotorised.com>
Ryan McCue <lists@rotorised.com> writes:
Show 5 quoted lines
> Good evening folks,
>
> I'm attempting to grab relevant information for files in a tree
> matching a given pattern with wildcards. The help for ls-tree
> indicates that it can accept a pattern of files to match,...

There are two uses of "pattern" there, and the former is probably OK but the latter is indeed misleading. Back when we wrote this command, there were two distinct "pathspec" families, and ls-tree belong to the one with "diff" family that did *not* take anything but "leading path pattern" (the other one from "ls-files" and "grep" family allowed wildcards). Giving a wildcard to the command in the "ls-tree/diff" family was never supported.

Later Nguyen and others started working on unifying the two separate "pathspec" semantics and we are probably halfway there. Many of the commands from "diff/log" family now can take wildcard (there may be new bugs in the codepaths, though), but "ls-tree" has not been converted.

Previous: Ryan McCueNext: Nguyen Thai Ngoc Duy
Message 4 of 6 in “ls-tree and wildcards”
  1. Ryan McCueMay 12, 2012
  2. Nguyen Thai Ngoc DuyMay 12, 2012
  3. Ryan McCueMay 12, 2012
  4. Junio C HamanoMay 14, 2012
  5. Nguyen Thai Ngoc DuyMay 15, 2012
  6. Junio C HamanoMay 15, 2012

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.