summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorDariusz Luksza2010-08-12 17:07:09 (EDT)
committer Dariusz Luksza2010-08-12 17:07:09 (EDT)
commit057173ac27c0724152f91869133dfa163d07fc6a (patch)
treec55fda00f128004352cd9edc555d92b27f76c482
parent1e44e13437067e76dd851ddb4e652f9b0f0ff0c4 (diff)
downloadegit-057173ac27c0724152f91869133dfa163d07fc6a.zip
egit-057173ac27c0724152f91869133dfa163d07fc6a.tar.gz
egit-057173ac27c0724152f91869133dfa163d07fc6a.tar.bz2
Exclude ignored files from synchronization.refs/changes/97/1297/1
Files that are derived or ignored by .gitignore are also excluded from synchronization result. Bug: 322454 Change-Id: I8b2752d7568164bb8a4b52a0691f9d129e59f4d9 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeSubscriber.java4
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/dto/GitSynchronizeDataSet.java2
2 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeSubscriber.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeSubscriber.java
index db67f6f..dbf0244 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeSubscriber.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeSubscriber.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.egit.core.synchronize;
+import static org.eclipse.team.core.Team.isIgnoredHint;
+
import org.eclipse.core.resources.IResource;
import org.eclipse.egit.core.CoreText;
import org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet;
@@ -50,7 +52,7 @@ public class GitResourceVariantTreeSubscriber extends
@Override
public boolean isSupervised(IResource resource) throws TeamException {
- return true; //gitSynchronizeDataSet.contains(resource.getProject());
+ return gsds.contains(resource.getProject()) && !isIgnoredHint(resource);
}
@Override
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/dto/GitSynchronizeDataSet.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/dto/GitSynchronizeDataSet.java
index 20dac6a..ddd8564 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/dto/GitSynchronizeDataSet.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/dto/GitSynchronizeDataSet.java
@@ -58,7 +58,7 @@ public class GitSynchronizeDataSet implements Iterable<GitSynchronizeData> {
* @return <code>true</code> if project has corresponding data
*/
public boolean contains(IProject project) {
- return projectMapping.containsKey(project);
+ return projectMapping.containsKey(project.getName());
}
/**