Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Stocker2014-04-18 16:16:25 +0000
committerMatthias Sohn2014-04-18 21:05:45 +0000
commit56cb94a45fadf565f9bb88148b83ff000ce686fc (patch)
treea9972e53eff0df3054de088f082b33b04a331a21 /org.eclipse.egit.core/src/org/eclipse/egit/core/op
parent9add60666b2c0efea47cee784dded4367f83041f (diff)
downloadegit-56cb94a45fadf565f9bb88148b83ff000ce686fc.tar.gz
egit-56cb94a45fadf565f9bb88148b83ff000ce686fc.tar.xz
egit-56cb94a45fadf565f9bb88148b83ff000ce686fc.zip
Don't look for .git in subdirectories of project
Connecting a project with a .git repository in one of its subdirectories breaks the Team menu for the project and makes the subdirectory disappear. When this happens with "auto share", it's very confusing. Other places in the code could also not really handle this, e.g. the share wizard displayed the repository location as ".git", when it really should have shown "sub/dir/.git". Bug: 421573 Change-Id: I4489cdd3526a30b1d2d575040792897a92da0c6d Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.core/src/org/eclipse/egit/core/op')
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java
index 360ce15aa8..4c086d566a 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java
@@ -114,8 +114,9 @@ public class ConnectProviderOperation implements IEGitOperation {
GitTraceLocation.CORE.getLocation(),
"Locating repository for " + project); //$NON-NLS-1$
- Collection<RepositoryMapping> repos = new RepositoryFinder(
- project).find(new SubProgressMonitor(monitor, 40));
+ RepositoryFinder finder = new RepositoryFinder(project);
+ finder.setFindInChildren(false);
+ Collection<RepositoryMapping> repos = finder.find(new SubProgressMonitor(monitor, 40));
File suggestedRepo = projects.get(project);
RepositoryMapping actualMapping= findActualRepository(repos, suggestedRepo);
if (actualMapping != null) {

Back to the top