DESCRIPTION

Fix GitModelObject adaptation to IResource

A GitModelObject returns the full absolute path to the object in the git
working tree. Using that for IWorkspaceRoot.getFile() creates a resource
with that as path, not as location. Which result in all deleted
resources having bogus paths in the Git Model of the Synchronize View.

This change maps back the git absolute path to a workspace-relative path
that can then safely be used with IWorkspaceRoot.getFile().

Adapting a GitModelObject to an IResource will work only for files
actually in the Eclipse workspace. Changing that so that it works also
for files in the working tree, but not in the workspace is _not_ fixed
by this change.

Change-Id: Ie539c3ad46f3f48ac6f01a365d20ceacd8952564
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2015-12-04 21:04:30.000000000

Uploaded patch set 2.

-------------------------------------
author: Alayna Houston
date: 2015-12-04 21:09:02.000000000

Patch Set 2:

(1 comment)

Line:161, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/factories/GitAdapterFactory.java -> This is the former behavior. It doesn't make much sense, but at least files in the working tree that are not in the workspace do get an icon in the Staging View. If we return null here, they are listed, but don't get an icon.

Anyway, as I wrote in the commit message, the Staging View appears to be pretty much broken for non-workspace files.

-------------------------------------
author: Jayvion Booth
date: 2015-12-04 21:17:18.000000000

Patch Set 2:

(1 comment)

Line:161, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/factories/GitAdapterFactory.java -> Do you really mean "Staging" view and not "Synchronize" view? If yes, what is broken in the Staging view for external files?

-------------------------------------
author: Alayna Houston
date: 2015-12-04 21:26:59.000000000

Patch Set 2:

(1 comment)

Line:161, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/factories/GitAdapterFactory.java -> Brrrr. My fingers were faster than my brain. Yes, of course I mean "Synchronize View".

-------------------------------------
author: Brenden Conley
date: 2015-12-04 21:28:31.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2015-12-04 21:51:42.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Jayvion Booth
date: 2015-12-05 09:21:05.000000000

Patch Set 3: Patch Set 2 was rebased

-------------------------------------
author: Gerrit Johnathan Pham
date: 2015-12-06 22:50:17.000000000

Change has been successfully merged into the git repository by Jayvion Booth

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