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

Bug 333269

Summary: C Git and JGit have different notions of $HOME in Windows
Product: [Technology] JGit Reporter: Robin Rosenberg <robin.rosenberg>
Component: JGitAssignee: Robin Rosenberg <robin.rosenberg>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: caniszczyk
Version: 0.11   
Target Milestone: 0.11-M1   
Hardware: PC   
OS: Windows All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 301775    

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.