Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Rosenberg2011-09-03 22:13:24 +0000
committerStefan Lay2011-09-09 15:15:16 +0000
commit118228576e64895a7a24e2c6bac7a5289ea86c10 (patch)
treec4a9436b1ea3fdd0ce3d20371a9f216276eb2fe3
parentd6fc3769a79338c1d7fbfe9f370b116f36113c30 (diff)
downloadegit-118228576e64895a7a24e2c6bac7a5289ea86c10.tar.gz
egit-118228576e64895a7a24e2c6bac7a5289ea86c10.tar.xz
egit-118228576e64895a7a24e2c6bac7a5289ea86c10.zip
Ignore submodule on checkout instead of deleting it
This fix depends on change-Id: I202c695a57af99b13d0d7220803fd08def3d9b5e in JGit Bug: 356664 Change-Id: I5606da3246bb4c322586a52efb4c9d7c38071ade Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java7
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties2
2 files changed, 6 insertions, 3 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java
index 7e27818f09..eac59d7697 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java
@@ -123,8 +123,11 @@ public class BranchOperation implements IEGitOperation {
File fileToDelete = new File(repository.getWorkTree(), path);
if (fileToDelete.exists())
try {
- FileUtils.delete(fileToDelete, FileUtils.RETRY
- | FileUtils.RECURSIVE);
+ // Only files should be passed here, thus
+ // we ignore attempt to delete submodules when
+ // we switch to a branch without a submodule
+ if (!fileToDelete.isFile())
+ FileUtils.delete(fileToDelete, FileUtils.RETRY);
} catch (IOException e) {
// ignore here
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
index a119c18bc4..53aa76888a 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
@@ -1210,7 +1210,7 @@ NewRemoteDialog_PushRadio=Configure &push
NewRemoteDialog_RemoteAlreadyExistsMessage=Remote {0} already exists
NewRemoteDialog_WindowTitle=New Remote
NewRepositoryWizard_WizardTitle=Create a Git Repository
-NonDeletedFilesDialog_NonDeletedFilesMessage=The files below could not be deleted, perhaps because of some temporary file locks
+NonDeletedFilesDialog_NonDeletedFilesMessage=The files below could not be deleted, \nperhaps because of some temporary file locks\nor because a directory represents a submodule
NonDeletedFilesDialog_NonDeletedFilesTitle=Not deleted Files
NonDeletedFilesDialog_RetryDeleteButton=&Retry delete
NonDeletedFilesTree_FileSystemPathsButton=Show file &system paths

Back to the top