Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Default value for the default repository path

On 30 Mar 2011, at 09:35, Matthias Sohn <matthias.sohn@xxxxxxxxxxxxxx> wrote:

2011/3/30 Baumgart, Jens <jens.baumgart@xxxxxxx>
I have some doubts if it is the right way to configure Eclipse via environment variables.
--Jens

-----Original Message-----
From: egit-dev-bounces@xxxxxxxxxxx [mailto:egit-dev-bounces@xxxxxxxxxxx] On Behalf Of Manuel Doninger
Sent: Dienstag, 29. März 2011 22:29
To: EGit developer discussion
Subject: [egit-dev] Default value for the default repository path

Hello,
the default value for the default repository path is currently the
user home directory (or the HOME variable). However, i think it would
be better to set that path via another environment variable.
I have all my repositories cloned to a folder on a second partition,
but i don't want to change the HOME variable to that folder, because i
don't know if there are other applications that use that variable. So
i have to adjust that option in every workspace. Thus it would be
better for me if i could provide a variable named e.g. EGIT_REPOPATH
for the repository path. As a fallback if that variable don't exist we
could still point to the user home directory.

What do you think about that?

Robin proposed a patch [1] allowing to use eclipse variables to configure the default location.
He mentioned that he would prefer to use the eclipse workspace as default location as this
is what users coming from CVS would expect.

So it seems we have 2 competing opinions here :
  • 1. use a fixed location outside Eclipse workspace
    • 1.1 that's the current behavior defaulting to the user's home directory,
      this was changed on request from Sascha who raised concerns [2] using the Eclipse
      workspace as default location
    • 1.2 Manuel wants to be able to configure that globally to another fixed location
  • 2. use Eclipse workspace as default 
How about adding a git configuration option "eclipse.defaultRepositoryRoot" ?
Users could configure that in their ~/.gitconfig and use either an absolute path or
an Eclipse variable to set the default path.

so all these values would be valid and could be shared across Eclipse workspaces :

[eclipse]
defaultRepositoryRoot = /my/fixed/git/default/root/
[eclipse]
defaultRepositoryRoot = ${workspace_loc}
[eclipse]
defaultRepositoryRoot = ~/

If we go for this solution I could also agree to have the default default (if
this configuration option is not set explicitly :) back at the Eclipse workspace
as this seems to be more natural for users coming from CVS or SVN.

Any thoughts on this proposal ?


--
Matthias
_______________________________________________
egit-dev mailing list
egit-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/egit-dev

Why not a settable option in Eclipse preferences? That's where Eclipse users will expect it. 

There are valid reasons against having it in the workspace; I think we should avoid that by default. However we should be able to allow a user to create a project in a workspace location and then init a git repo in the same place (for that single project). 

Finally we probably want to support a "move to" option which takes a project in the workspace and then does a move to a git repo elsewhere. This should also allow multiple projects to be shared with git and provide a migration path for those not used to locations. 

Ideally, the Eclipse workspace concept should just die. 

Alex

Back to the top