Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Default repository folder is too inflexible
Default repository folder is too inflexible [message #753422] Thu, 27 October 2011 08:07 Go to next message
Thorsten Kamann is currently offline Thorsten KamannFriend
Messages: 7
Registered: July 2009
Junior Member
Hello,

why is the default repository folder not mapped to the workspace folder. This is the default folder for much eclipse actions like creating a new project. If I clone a repo this isn't a great thing. I can change the default folder - although this is very boring to do this...

But if I import a GitHub repo I can't change this folder and the cloned repos isn't in my workspace folder.

Why is this so implemented? Any reasons?

Thanks
Thorsten
Re: Default repository folder is too inflexible [message #753517 is a reply to message #753422] Thu, 27 October 2011 14:45 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
It's true that some other Eclipse team providers use the workspace directory in this way by default. I always found it annoying, I much prefer what egit does. To me a workspace and a repository (or a checkout in SVN of CVS) are distinct things that should live in distinct areas of the file system. For one thing I regularly access repositories from a shell, and therefore completely outside the context of any Eclipse workspace. I also occasionally need the same repo/checkout to be part of more than one workspace.

Mixing up the idea of workspace inclusion with directory inclusion seems like bad modularity to me. What egit does by default is a better design imo,


Re: Default repository folder is too inflexible [message #753711 is a reply to message #753517] Fri, 28 October 2011 13:11 Go to previous messageGo to next message
Stefan Lay is currently offline Stefan LayFriend
Messages: 342
Registered: July 2009
Senior Member
Yes, for me also a workspace and a repository (or a checkout in SVN of CVS) are distinct things that should live in distinct areas of the file system.

For other reasons please have a look at the discussion of this in the egit user guide: http://wiki.eclipse.org/EGit/User_Guide#Considerations_for_Git_Repositories_to_be_used_in_Eclipse:

"It is a good idea to keep your Repository outside of your Eclipse Workspace

There are several reasons for this:

- The new Repository will consider the complete folder structure of the Eclipse workspace as (potential) content. This can result in performance issues, for example when calculating the changes before committing (which will scan the complete .metadata folder, for example); more often than not, the workspace will contain dead folders (e.g. deleted projects) which semantically are not relevant for EGit but can not be excluded easily.

- The metadata (.git-) folder will be a child of the Eclipse Workspace. It is unclear whether this might cause unwanted folder traversals by Eclipse.

- You can easily destroy your Repository by destroying your Eclipse Workspace "
Re: Default repository folder is too inflexible [message #755139 is a reply to message #753711] Mon, 07 November 2011 13:50 Go to previous messageGo to next message
Thorsten Kamann is currently offline Thorsten KamannFriend
Messages: 7
Registered: July 2009
Junior Member
Ok, managing the project files out of the workspace can be useful. But in the github integration there isn't a chance to change the directory at all.

Is an alternative could be an additional option to use the workspace directory with a subfolder with the name of the repository? Eg.:

$wokspace_dir/
myrepo.git/
.git/
.metdata/

Re: Default repository folder is too inflexible [message #755160 is a reply to message #755139] Mon, 07 November 2011 15:14 Go to previous message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
The egit nightly build allows you to specify a destination directory when cloning from github.

I'm currently running 1.2.0.201111070722

[Updated on: Mon, 07 November 2011 15:42]

Report message to a moderator

Previous Topic:egit ssh with domain\username@reposerver
Next Topic:Performance issue with large files
Goto Forum:
  


Current Time: Fri Dec 19 23:35:40 GMT 2014

Powered by FUDForum. Page generated in 0.01843 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software