DESCRIPTION

Don't use RepositoryProvider.getProvider() directly to avoid deadlocks

Added ResourceUtil.getGitProvider(IProject) and
ResourceUtil.isSharedWithGit(IResource) utility methods which mimics the
code in the RepositoryProvider.getProvider() without accessing any
locks.

Additionally fixed related, possible NPE's along the RepositoryMapping
constructor and getGitDirAbsolutePath() code.

Bug: 469555
Change-Id: I2349280b7fe73289a2a1cd9e8c802f8f7499327c
Signed-off-by: Jayvion Booth xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2015-07-02 04:37:50.000000000

Patch Set 10:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/7248/

-------------------------------------
author: Brenden Conley
date: 2015-07-02 04:59:10.000000000

Patch Set 10: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/7248/ : SUCCESS

-------------------------------------
author: Jayvion Booth
date: 2015-07-02 07:54:20.000000000

Patch Set 10:

Matthias, do you have time for review?

-------------------------------------
author: Douglas Trujillo
date: 2015-07-02 08:53:33.000000000

Patch Set 10:

yes, will look into this

-------------------------------------
author: Douglas Trujillo
date: 2015-07-02 13:21:13.000000000

Patch Set 10: Code-Review-1

(5 comments)

File Comment: org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java -> this looks like an unrelated change

Line:71, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ResourceUtil.java -> I would move that into MappingJob and call it INSTANCE

Line:160, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ResourceUtil.java -> I would move that into MappingJob

Line:368, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/sharing/ExistingOrNewPage.java -> what does this do ?

Line:14, /COMMIT_MSG -> it looks like you are combining multiple unrelated changes into one

-------------------------------------
author: Jayvion Booth
date: 2015-07-03 21:30:02.000000000

Patch Set 10:

(5 comments)

I've separated https://git.eclipse.org/r/#/c/51355/ from this patch. The next patch contains all the proposed fixes.

File Comment: org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java -> Done

Line:71, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ResourceUtil.java -> Done

Line:160, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ResourceUtil.java -> Done

Line:368, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/sharing/ExistingOrNewPage.java -> Creates additional entries "where the repository was found for the current project, if there are multiple candidates in the file tree" in the dialog, but honestly speaking, I had to run tests in the debugger to understand what it is. I never seen/used this live before, but fortunately there were tests exact for this case.

Line:14, /COMMIT_MSG -> Done

-------------------------------------
