Create NameConflictTreeWalk to transparently detect D/F conflicts
When performing a merge between two or more tree iterators we really
need to be able to detect a directory-file conflict and handle it as
a single step of the TreeWalk iteration. This way we can merge say
three iterators together:
- commit $A
- commit $B
- working tree
Where the working tree is moving from $A to $B and the file path
"foo" has been changed from being a file in $A to a directory in
commit $B. To make this change effective we must delete "foo"
and then enter the "foo" subtree to create the directory and
the paths within it.
This walk implementation is outside of TreeWalk as it is not a
trivial operation. Applications should only use this variant
when conflict handling is absolutely necessary. Basic commit
filtering (such as done by RevWalk) does not need this support
so we really don't want to bog down RevWalk's critical loop.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>