Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326374

Summary: Problems with using Eclipse workspace as base directory for working directories
Product: [Technology] EGit Reporter: Sascha Scholz <sascha.scholz>
Component: CoreAssignee: Mathias Kinzler <mathias.kinzler>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jamesblackburn+eclipse, mathias.kinzler, matthias.sohn
Version: 0.10.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Sascha Scholz CLA 2010-09-28 03:08:12 EDT
Build Identifier: Helios 20100617-1415

I've experienced some problems because EGit uses the Eclipse workspace as base directory for checkouts.

1) New projects can have name conflicts with EGit repositories (e.g. you create a new project and unexpectedly see the EGit working directory content)

2) When importing projects with M2Eclipse, it allows to specify a naming pattern for the new projects (e.g. <groupid>.<artifactid>). This doesn't work if the project lies top-level in the working directory. This could also be a limitation in the IDE or a bug in M2Eclipse.

Of course it's easy to specify a different working directory when creating/importing an Egit repository, but I'd like to have the default changed to sth. else than the Eclipse workspace.

BTW, would it be feasible to add a configuration option in the EGit preferences to change this base directory?

Reproducible: Always
Comment 1 Mathias Kinzler CLA 2010-10-01 11:41:57 EDT
Code review at http://egit.eclipse.org/r/#change,1694
Comment 2 Matthias Sohn CLA 2010-10-03 17:56:10 EDT
merged as 1f972b32da0923e29f78476273b8205eda6051ec
Comment 3 James Blackburn CLA 2011-05-25 10:14:31 EDT
See also bug 345541.

In choosing the workspace location, the user has already indicated to eclipse the default location for new projects and new checkout-out content (at least for CVS + SVN checkouts).  I believe egit should respect the user's choice rather than using a fixed arbitrary alternative ($HOME).  

A fixed location results in clones that are separate from the workspace (not easy to delete, or find from a shell, for example).  And prevents users from cloning more than one copy of a repo without additional work.