Refactor our command line ls-tree tool to use FileMode's type knowledge
commit531f9730f97db4fd00a40e68fdf0e6a07ccb7986
authorShawn O. Pearce <spearce@spearce.org>
Fri, 4 Apr 2008 23:16:13 +0000 (4 19:16 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 7 Apr 2008 05:06:35 +0000 (7 01:06 -0400)
treefca77bfe0c84f433c2bdda973fee4994db91cf3f
parent0f5e014452984d1644cc412a7b1cde5d690d2d5b
Refactor our command line ls-tree tool to use FileMode's type knowledge

Now that FileMode knows what type it should be we can use this
when we show the mode data as part of the ls-tree output.

We also disable recursive behavior by default, but turn it on
if the user requests recursive walking with "-r".  This allows
us to run the TreeWalk code in both modes of operation, and is
also a way to better match the C Git version of this same tool.

I refactored how we decide if our argument is a directory or
not, as when we add index (aka dircache) walking to this we
will want to also guess if the name is a dircache path.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.spearce.jgit/src/org/spearce/jgit/pgm/LsTree.java