aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-07-21 10:51:15 +0200
committerShawn O. Pearce <spearce@spearce.org>2010-07-21 10:34:08 -0700
commit09910ffa32e472481a3ba237cf99d803576c9172 (patch)
treee94c076de081f7a5e345acef8b5d653245f21ca8 /org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
parent0ec0e21fdf6a60692cf796ea789b689eb1f0b0b2 (diff)
downloadjgit-09910ffa32e472481a3ba237cf99d803576c9172.tar.gz
jgit-09910ffa32e472481a3ba237cf99d803576c9172.zip
Move ignore node handling into WorkingTreeIterator
The working tree iterator has perfect knowledge of the path structure as well as immediate information about whether or not an ignore file even exists at this level. We can exploit that to simplify the logic and running time for testing ignored file status by pushing all of the checks down into the iterator itself. Change-Id: I22ff534853e8c5672cc5c2d9444aeb14e294070e Signed-off-by: Shawn O. Pearce <spearce@spearce.org> CC: Charley Wang <chwang@redhat.com> CC: Chris Aniszczyk <caniszczyk@gmail.com> CC: Stefan Lay <stefan.lay@sap.com> CC: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
index 238d1d287a..23e30ca68b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
@@ -119,8 +119,7 @@ public class AddCommand extends GitCommand<DirCache> {
final TreeWalk tw = new TreeWalk(repo);
tw.reset();
tw.addTree(new DirCacheBuildIterator(builder));
- FileTreeIterator fileTreeIterator = new FileTreeIterator(
- repo.getWorkDir(), repo.getFS());
+ FileTreeIterator fileTreeIterator = new FileTreeIterator(repo);
tw.addTree(fileTreeIterator);
tw.setRecursive(true);
tw.setFilter(PathFilterGroup.createFromStrings(filepatterns));