| Summary: | 'Default Repository folder:' should default to ${workspace_loc} | ||
|---|---|---|---|
| Product: | [Technology] EGit | Reporter: | James Blackburn <jamesblackburn+eclipse> |
| Component: | UI | Assignee: | Project Inbox <egit.ui-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | arend, daniel_megert, jens.baumgart, mailings, markus.kell.r, matthias.sohn, mistria, piotr.findeisen, robin, vkadlcik |
| Version: | 0.12 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux-GTK | ||
| Whiteboard: | |||
| Bug Depends on: | 383320 | ||
| Bug Blocks: | |||
|
Description
James Blackburn
There's an open change for this: http://egit.eclipse.org/r/#change,2735 The problem is that some EGit committers don't agree that the home directory is not the right default location. (In reply to comment #1) > The problem is that some EGit committers don't agree that the home directory is > not the right default location. Interesting... I have 10s of workspaces, each with different repositories in different states (different release branches checked out, etc.). The whole point of an eclipse workspace is that it keep code and metadata for a given 'view' together in a namespaced directory. Using a fixed default doesn't work as it means you can only clone a single copy of a given repository (without going through extra effort). ${workspace_loc} is a much better choice than /home/ as I (the user) have made a conscious choice of where to put my workspace on Eclipse startup. I believe it's wrong for egit to use a directory which doesn't relate to this choice, as anyone who doesn't store their work directories under /home/ will be forced to manually change this. I agree the home directory is a bad default.
Using just ${workspace_loc} can be confusing, since git repos and "normal" projects then share the same namespace inside the workspace directory.
I always use "${workspace_loc}/git", which provides a good separation and keeps all git repos cleanly together at a single location.
(In reply to comment #3) > I always use "${workspace_loc}/git", which provides a good separation and > keeps all git repos cleanly together at a single location. I don't much mind. I don't think the .../git adds much, most the repos are now multi-project anyway, and surely all projects are in version control ;). Being somewhere under the workspace is the key though. This is the only location the user has actively chosen at eclipse startup. (In reply to comment #4) > (In reply to comment #3) > > I always use "${workspace_loc}/git", which provides a good separation and > > keeps all git repos cleanly together at a single location. > > I don't much mind. I don't think the .../git adds much, most the repos are > now multi-project anyway, and surely all projects are in version control ;). > > Being somewhere under the workspace is the key though. This is the only > location the user has actively chosen at eclipse startup. + for "${workspace_loc}/git". The advantage of having a separate folder is that one can easily differentiate the git projects from other stuff (e.g. locally imported/created projects. This is a real source of confusion and time waster. Please adhere to Eclipse conventions and place workspace-related data into the workspace. The argumentation in http://egit.eclipse.org/r/#change,2735 is very weak. "Some people have strange way of dealing with eclipse errors" is not an argument for any solution. If these strange people decide to delete their data, then let them do it. (In reply to Robin Stocker from comment #1) > There's an open change for this: > > http://egit.eclipse.org/r/#change,2735 > > The problem is that some EGit committers don't agree that the home directory > is not the right default location. I also think the current approach fits better to the Git way of working. -1 from me for changing the default to workspace. Changing it to the workspace location prevents a "git clean -fdx" to clean up the git tree, since it'll wipe out the Eclipse files. (for me) It's best practice to _never_ mix the Eclipse workspace and the git checkout. Also, conceptually they have nothing in common and therefore should not be mixed. Putting multiple version of projects in multiple workspaces was just a way to emulate branches that are now provided by Git. So I don't think we should encourage this approach and we should make the project live in a "neutral" directory, not under an Eclipse workspace folder. So -1 for this suggestion as well. (In reply to Ferry Huberts from comment #8) > Changing it to the workspace location prevents a "git clean -fdx" to clean > up the git tree, since it'll wipe out the Eclipse files. This is incorrect. Using the workspace location would result in a tree like this: path/to/workspace/ .metadata/ repo-1/ .git/ src/ repo-2/ .git/ file.txt Running clean would be inside e.g. repo-1, so would not touch .metadata. (In reply to Robin Stocker from comment #10) > (In reply to Ferry Huberts from comment #8) > > Changing it to the workspace location prevents a "git clean -fdx" to clean > > up the git tree, since it'll wipe out the Eclipse files. > > This is incorrect. Using the workspace location would result in a tree like > this: > > path/to/workspace/ > .metadata/ > repo-1/ > .git/ > src/ > repo-2/ > .git/ > file.txt > > Running clean would be inside e.g. repo-1, so would not touch .metadata. ah ok I understood differently. thanks. I still wouldn't do it like this though :-) Just to add user's voice to the discussion.
I always configure ${workspace_loc} as the default repo dir.
More, to avoid incidental clone to a wrong location, my ~/git is an empty file ;)
Reason is simple: I work with a large project and use static code analysis tools like FindBugs. Switching from master to a maintentace branch would be quick -- but then it would take ages to analyze changed code (unfortunately, FB plugin doesn't seem to have support for that.) So, I maintain separate workspace per product branch supported. Managing (incl. copying/cloning) multiple workspaces is much easier if the code is cloned within workspace dir, thus Eclipse's default setting is not suitable in this case.
(Of course, my use case remains problematic regardless of this setting until bug 358285 is fixed.)
|