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

Re: [PATCH] Add a notice to the doc of git-ls-tree.

From
Petr Baudis <pasky@suse.cz>
Date
Jul 20, 2008, 23:39 UTC
Message-ID
<20080720233956.GH10151@machine.or.cz>
In-Reply-To
<7vy73w16nj.fsf@gitster.siamese.dyndns.org>
On Sun, Jul 20, 2008 at 04:24:00PM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> Petr Baudis <pasky@suse.cz> writes:
> 
> > I think that ls-tree simply shouldn't auto-fill its pathspec based on
> > current prefix in case no pathspec was supplied. Patch to follow.
> 
> Have you dug the list archive from mid-to-late December 2005 that prompted
> the current behaviour (and introduction of --full-name)?  I haven't.  A
> change to always do the --full-name can only be justified by doing so and
> rehashing the issues.
> 
> On the other hand, "fix" is welcome.

You are right, now that I understand the issue better, there's no good fix for this except perhaps introducing --no-prefix, which is not my itch to scratch. Here's my original wording improvement:

	Note that if you are within a subdirectory of your working copy,
	'git ls-tree' will automatically prepend the subdirectory prefix
	to the specified paths, and assume the prefix specified in case
	no paths were given - no matter what the tree object is! Thus,
	within a subdirectory, 'git ls-tree' behaves as expected only
	when run on a root tree object.
-- 
				Petr "Pasky" Baudis
As in certain cults it is possible to kill a process if you know
its true name.  -- Ken Thompson and Dennis M. Ritchie
Previous: Junio C HamanoNext: Petr Baudis
Message 5 of 20 in “Add a notice to the doc of git-ls-tree.”
  1. Add a notice to the doc of git-ls-tree.Steve Frécinaux, Jul 20, 2008
  2. Petr BaudisJul 20, 2008
  3. Steve FrécinauxJul 20, 2008
  4. Junio C HamanoJul 20, 2008
  5. Petr BaudisJul 20, 2008
  6. Documentation/git-ls-tree.txt: Add a caveat about prefixing pathspecPetr Baudis, Jul 21, 2008
  7. Junio C HamanoJul 21, 2008
  8. Petr BaudisJul 21, 2008
  9. Junio C HamanoJul 22, 2008
  10. Petr BaudisJul 22, 2008
  11. Petr BaudisJul 28, 2008
  12. Junio C HamanoJul 28, 2008
  13. Junio C HamanoJul 28, 2008
  14. Steve FrécinauxJul 21, 2008
  15. Junio C HamanoJul 20, 2008
  16. Petr BaudisJul 21, 2008
  17. Junio C HamanoJul 21, 2008
  18. Petr BaudisJul 21, 2008
  19. Junio C HamanoJul 21, 2008
  20. Petr BaudisJul 21, 2008

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.