DESCRIPTION

Extended support for nested Git repositories in project.

reworked based on "https://git.eclipse.org/r/#/c/67186/"

The fixes are going to support nested repositories in one project and
the submodule fixes are "only" related to this, because they are nested
repos too. I've not planned to fix submodules first, but we are
investigating to use them later.

Bug: 446344
Bug: 401556
Bug: 411742
Change-Id: Ie9aa6bd9df812c515e9f4967e1fb06c17e7cf636
Signed-off-by: Genevieve Hudson xxx@xxx.xxx


COMMENTS

author: Genevieve Hudson
date: 2016-03-04 13:58:22.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2016-03-04 13:58:28.000000000

Patch Set 4:

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

-------------------------------------
author: Brenden Conley
date: 2016-03-04 14:25:07.000000000

Patch Set 4: Verified+1

Build Successful 

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

-------------------------------------
author: Alayna Houston
date: 2016-03-04 21:12:13.000000000

Patch Set 4: Code-Review-1

(4 comments)

Line:385, org.eclipse.egit.core/src/org/eclipse/egit/core/project/GitProjectData.java -> I still think this renaming is superfluous...

Line:459, org.eclipse.egit.core/src/org/eclipse/egit/core/project/GitProjectData.java -> nested repositories.

Line:470, org.eclipse.egit.core/src/org/eclipse/egit/core/project/RepositoryMapping.java -> This function doesn't make much sense here. IProjects not necessarily are work tree roots; projects can be at any level in a repository working directory.

Line:14, /COMMIT_MSG -> Commit message no longer applies. And this is no longer related to the bugs listed below.

-------------------------------------
author: Genevieve Hudson
date: 2016-03-05 12:28:13.000000000

Patch Set 4:

(3 comments)

Thanks, cleaned up again and wrote down all changes --> PS5

Line:385, org.eclipse.egit.core/src/org/eclipse/egit/core/project/GitProjectData.java -> Done

Line:459, org.eclipse.egit.core/src/org/eclipse/egit/core/project/GitProjectData.java -> Done

Line:470, org.eclipse.egit.core/src/org/eclipse/egit/core/project/RepositoryMapping.java -> OK, agreed that IProjects is not anymore necessarily a work tree. But then it means that also GitProjectData has to be there if we have no git work tree at project root. It would be good, but not working because during project import (share) it does not look at nested repos if there is no one at root level. So i will investigate, but think you know what the problems are here, perfomance and asynchronious refresh etc.

Just about why i instoduced a new method here: developer like me (not working full day at EGit) has no idea first time what getContainer() means. Container is just a container, here it has meaning of holding a "repository mapping" with repository and working directory. So for me only mapping should know something about container; using this knowledge in decorators or other components is not clear design, but i'm just try to understand the architecture.

-------------------------------------
author: Alayna Houston
date: 2016-03-07 06:52:03.000000000

Patch Set 4:

(1 comment)

Line:470, org.eclipse.egit.core/src/org/eclipse/egit/core/project/RepositoryMapping.java -> Re: it does not look at nested repos if there is no one at root level

And well it shouldn't. If the project is inside a git repo, that git repo will be found at import, and inner repositories will be found by the resource change event handling after the import. If the project is not inside a git repo, then we'll never pick up folders that happen to be in some git repository, but that's ok because the project will not be EGit-managed anyway. Or did you want to support git functionality in non-EGit-managed projects? Now that would be a vary major change.

getContainer() just means "get the IContainer this RepositoryMapping is attached to". For inner repositories, this container will be an IFolder, and it will be at the root of the inner git repository's working directory. However, if the container is an IProject, it's not necessarily at the containing git repository's working directory _root_: it can be anywhere inside that working directory.

-------------------------------------
author: Genevieve Hudson
date: 2016-03-07 08:35:46.000000000

Patch Set 4:

(1 comment)

Line:470, org.eclipse.egit.core/src/org/eclipse/egit/core/project/RepositoryMapping.java -> Thank You for the explanation! 

> Or did you want to support git functionality in non-EGit-managed projects? Now that would be a vary major change.
Re: It would be good and that's the point wanted to workaround with the linked resources. But for this patch it's not addressed. Just asking to get the feeling about the expected features :)

I've tried to address all comments in PS5.

-------------------------------------
author: Genevieve Hudson
date: 2016-03-17 09:21:13.000000000

Patch Set 4:

(1 comment)

Line:14, /COMMIT_MSG -> Done

-------------------------------------
author: Genevieve Hudson
date: 2016-03-17 09:24:32.000000000

Patch Set 4:

(1 comment)

--> PS7

Line:470, org.eclipse.egit.core/src/org/eclipse/egit/core/project/RepositoryMapping.java -> renamed to isRepositoryContainer and tested with nested projects (repo is outside of eclipse project) too, so project root is decorated.

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-03-21 19:18:36.000000000

Change has been successfully merged into the git repository by Alayna Houston

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