Refactor AbstractTreeIterator.pathCompare to force another mode
commit4a91b92f1314a4219c465ed6166986afe65b1ff7
authorShawn O. Pearce <spearce@spearce.org>
Mon, 18 Aug 2008 23:53:14 +0000 (18 16:53 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Wed, 20 Aug 2008 21:07:31 +0000 (20 23:07 +0200)
tree929b5b3cc60daae4bfc59da23d860828b99a0048
parent0c74a7027ca023e31ba6b0c2bf1c972bd820f7e8
Refactor AbstractTreeIterator.pathCompare to force another mode

When handling D/F (directory/file) conflicts we need to pretend that one
of the two iterators has the other "type" of mode so we can search for
possible matches.  Rather than editing the mode instance member we now
overload pathCompare to accept the 2nd iterator's mode as an argument.

We can now force a tree entry to compare as a normal file by passing
in a mode of 0, or we can force a file entry to compare as a tree by
passing in FileMode.TREE.getBits().

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/treewalk/AbstractTreeIterator.java