]> git.ipfire.org Git - thirdparty/git.git/commit - tree.h
ls-tree: major rewrite to do pathspec
authorLinus Torvalds <torvalds@osdl.org>
Sat, 26 Nov 2005 17:38:20 +0000 (09:38 -0800)
committerJunio C Hamano <junkio@cox.net>
Tue, 29 Nov 2005 07:00:14 +0000 (23:00 -0800)
commit3c5e8468a93cdb427b4c4a129339e80e1813e5c0
treef924da722242e90150ba1b56fb85bc1f2317ed03
parent9ef2b3cbf62d15aa0312bde349347873d7c0f399
ls-tree: major rewrite to do pathspec

git-ls-tree should be rewritten to use a pathspec the same way everybody
else does. Right now it's the odd man out: if you do

git-ls-tree HEAD divers/char drivers/

it will show the same files _twice_, which is not how pathspecs in general
work.

How about this patch? It breaks some of the git-ls-tree tests, but it
makes git-ls-tree work a lot more like other git pathspec commands, and it
removes more than 150 lines by re-using the recursive tree traversal (but
the "-d" flag is gone for good, so I'm not pushing this too hard).

Linus
ls-tree.c
tree.c
tree.h