Re: [PATCH] Documentation/git-ls-tree.txt: Add a caveat about prefixing pathspec
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 28, 2008, 09:23 UTC
- Message-ID
- <7vabg2s6ot.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <7vvdyqx0i0.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 9 quoted lines
> Petr Baudis <pasky@suse.cz> writes: > >>> We may throw a dice or go with your version, I don't care *that* much >>> about this change, I just wouldn't make it personally. >> >> What is the status of this patch? :-) Dropped altogether? > > Left behind on the far side of oblivion; I do not offhand recall what this > was about, sorry.
Ok, I now recall this bit:
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.Eventually somebody may write a Porcelain that benefits from --no-prefix, but it is safe to defer the implementation until the need becomes real.
I'll add some explanatory message to the documentation.