Implement FileMode.fromBits utility in TreeWalk
commite319780a6a7da6b42ad35d58754e26261d714fc7
authorShawn O. Pearce <spearce@spearce.org>
Wed, 14 May 2008 04:46:44 +0000 (14 00:46 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 17 May 2008 03:59:49 +0000 (16 23:59 -0400)
tree18e6bbfa348c83d6a3965cd4278a23eea4a227af
parent9958e600d12d0d77d8652497b89d42ad4a3fd52b
Implement FileMode.fromBits utility in TreeWalk

I'm finding that we need to convert the raw mode bits supplied by
TreeWalk into a FileMode in a number of places, usually so that we
can then obtain the OBJ_* type constant that the FileMode refers
to in a tree entry.  Creating a utility for this translation in
TreeWalk just saves us some redundant code in applications.

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