diff options
author | Shawn Pearce <sop@google.com> | 2015-12-24 14:27:50 -0800 |
---|---|---|
committer | Shawn Pearce <spearce@spearce.org> | 2015-12-29 11:33:35 -0800 |
commit | 3776b14ab45ca1daf0771fa1a8245bc097ec2e12 (patch) | |
tree | 657fca9a14978f343e101110d752ec1e1628abe5 /org.eclipse.jgit/src/org/eclipse/jgit/dircache | |
parent | 4b7839cafd3561bbeca6ed6dabce3d9039ab8288 (diff) | |
download | jgit-3776b14ab45ca1daf0771fa1a8245bc097ec2e12.tar.gz jgit-3776b14ab45ca1daf0771fa1a8245bc097ec2e12.zip |
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
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/dircache')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuildIterator.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuildIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuildIterator.java index da55306665..c10e416082 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuildIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuildIterator.java @@ -130,4 +130,9 @@ public class DirCacheBuildIterator extends DirCacheIterator { if (cur < cnt) builder.keep(cur, cnt - cur); } + + @Override + protected boolean needsStopWalk() { + return ptr < cache.getEntryCount(); + } } |