Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333269 - C Git and JGit have different notions of $HOME in Windows
Summary: C Git and JGit have different notions of $HOME in Windows
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 0.11   Edit
Hardware: PC Windows All
: P3 normal (vote)
Target Milestone: 0.11-M1   Edit
Assignee: Robin Rosenberg CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 301775
  Show dependency tree
 
Reported: 2010-12-28 11:39 EST by Robin Rosenberg CLA
Modified: 2011-02-15 19:19 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Rosenberg CLA 2010-12-28 11:39:02 EST
JGit uses the system property user.home, but this is different from where Git for Windows (aka msysgit) thinks it is.

I.e. JGit will read the "global" configuration file from my directory in C:/Documents and Settings, but my $HOME in msys bash is  on a network share. In cygwin it is in the same location as Java thinks it is.

We have some logic to detect Win32 with cygwin vs not, but there is a problem. When eclipse is launched neither cygwin or msys git is not necessariliy in the PATH, even when they are used extensively by a user.

Suggestions?

See also Bug 333216, which struggles with how to find which git's installation to reference for the system wide git configuration file. The problem is not exactly the same, though.
Comment 1 Robin Rosenberg CLA 2010-12-28 15:41:48 EST
Correction. My cygwin's HOME points to the same place as msys' HOME, but cygwin uses a UNC path instead.
Comment 2 Robin Rosenberg CLA 2010-12-29 08:34:39 EST
There is an open bug at Sun relating to user.home

http://bugs.sun.com/view_bug.do?bug_id=4787931

Not that I expect it to be fixed, but there are some suggestions that I think wil work for us.
Comment 3 Robin Rosenberg CLA 2011-01-12 09:06:04 EST
http://egit.eclipse.org/r/2237
Comment 4 Shawn Pearce CLA 2011-01-12 10:45:47 EST
Merged Robin's change.