Re: [PATCH] ls-tree: remove trailing slashes properly.
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- May 31, 2005, 22:19 UTC
- Message-ID
- <Pine.LNX.4.58.0505311507010.1876@ppc970.osdl.org>
- In-Reply-To
- <7vvf4zvzfw.fsf@assigned-by-dhcp.cox.net>
On Tue, 31 May 2005, Junio C Hamano wrote:
> > A typo prevented trailing slashes from being removed properly.
This is still wrong.
> This fixes the problem that "drivers/char" which is a tree was > not shown when "drivers/char/" is given.
I sent an earlier email pointing out that removing trailing slashes is _incorrect_, because it means that "drivers/char/" will match the _file_ "drivers/char", which is wrong.
IOW, the trailing slash should not be removed, it's the _test_ that is wrong.
I just checked in a fix for this in diffcore-patchspec.c, I'd hope that ls-tree could get it right too. Removing trailing slashes is a bandaid that hides one bug by making it appear as a different bug.
Linus