]> source.dussan.org Git - jgit.git/commit
AddCommand: Use NameConflictTreeWalk to identify file-dir changes 61/63061/4
authorShawn Pearce <sop@google.com>
Thu, 24 Dec 2015 22:27:50 +0000 (14:27 -0800)
committerShawn Pearce <spearce@spearce.org>
Tue, 29 Dec 2015 19:33:35 +0000 (11:33 -0800)
commit3776b14ab45ca1daf0771fa1a8245bc097ec2e12
tree657fca9a14978f343e101110d752ec1e1628abe5
parent4b7839cafd3561bbeca6ed6dabce3d9039ab8288
AddCommand: Use NameConflictTreeWalk to identify file-dir changes

Adding a path that already exists but is changing type such as
from symlink to subdirectory requires a NameConflictTreeWalk to
match up the two different entry types that share the same name.

NameConflictTreeWalk needs a bug fix to pop conflicting entries
when PathFilterGroup aborts the walk early so that it does not
allow DirCacheBuilderIterator to copy conflicting entries into
the output cache.

Change-Id: I61b49cbe949ca8b4b98f9eb6dbe7b1f82eabb724
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuildIterator.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/EmptyTreeIterator.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java