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

Potential Issue with ls-tree documentation

From
KBKevin Bowersox <kevin.m.bowersox@gmail.com>
Date
Jan 11, 2020, 09:46 UTC
Message-ID
<18b8b8fd-ee38-e1bf-8fae-b719b7b78a75@gmail.com>

Within the ls-tree documentation for Git found here: https://git-scm.com/docs/git-ls-tree <https://git-scm.com/docs/git-ls-tree>

It mentions the following:

the behaviour is slightly different from that of "/bin/ls" in that the <path> denotes just a list of patterns to match, e.g. so specifying directory name (without |-r|) will behave differently, and order of the arguments does not matter.

I'm wondering if this statement is accurate.  Here is my reasoning:
When using this form of the command:
git ls-tree <tree-ish> [<path>]

the <tree-ish> (assuming this is typically a branch name) must be specified prior to the path, making the order of the arguments matter when issuing the command.

If my reasoning is correct I would be glad to submit the changes for review/merge.

Appreciate any insights.
Kevin Bowersox
Next: Junio C Hamano
Message 1 of 3 in “Potential Issue with ls-tree documentation”
  1. Kevin BowersoxJan 11, 2020
  2. Re* Potential Issue with ls-tree documentationJunio C Hamano, Jan 13, 2020
  3. Elijah NewrenJan 13, 2020

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.