DESCRIPTION

Fix importing of submodule repositories using Git 1.7.8 layout

The submodule Git directory is in .git/modules/$mod and the .git in the
submodule directory is a text file with "gitdir: ../.git/modules/$mod".

This change includes three parts:

* Use FileRepositoryBuilder in RepositoryFinder to find repos, because
  it already knows how to handle the above format
* Fix GitProjectData to handle RepositoryMapping where getGitDirPath
  returns an absolute path (IPath#append just ignores that)
* Fix ExistingOrNewPage to be able to handle absolute paths where the
  Git directory is not below the worktree path

FileRepositoryBuilder from JGit does not try to find a repository inside
GIT_CEILING_DIRECTORIES (like C Git does, see [1]), whereas EGit did
include the ceiling directories themselves. This change in behavior
required adjusting the test setup to set the ceiling to the parent dir.

[1] http://git-scm.com/docs/git#_the_git_repository

Bug: 378611
Change-Id: Iecf1c85f4d24b153ac734b3bd615e72fdfcb3717
Signed-off-by: Danika Greer xxx@xxx.xxx
Signed-off-by: Douglas Trujillo xxx@xxx.xxx

COMMENTS

author: Douglas Trujillo
date: 2013-12-15 22:27:47.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2013-12-15 22:27:53.000000000

Patch Set 4:

Build Started https://hudson.eclipse.org/egit/job/egit-stable.gerrit/263/

-------------------------------------
author: Brenden Conley
date: 2013-12-15 22:41:39.000000000

Patch Set 4: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit-stable.gerrit/263/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2013-12-15 23:31:47.000000000

Patch Set 4:

looks good, and definitively better than without these patches

But still I face the problem that the staging view and decorators show the super project always as dirty showing the submodules as modified, trying to commit these changes fails with error "no changes". I used the following example to test:

using native git (EGit seems not yet to be able to create new style submodules)
- create an new repository "super" containing a readme file and commit readme in first commit
- add jgit and egit as submodules and commit this addition
- import super project using egit with this patch series

result is that the jgit and egit submodules are always shown as modified

-------------------------------------
author: Danika Greer
date: 2013-12-15 23:50:02.000000000

Patch Set 4:

That's the following bug AFAICS:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=391280

These changes didn't try to fix that, it's a separate issue. I don't think we'll be able to fix that for 3.2 (no time left :)).

-------------------------------------
author: Douglas Trujillo
date: 2013-12-16 14:54:12.000000000

Patch Set 4: Code-Review+2 IP-Clean+1

-------------------------------------
author: Douglas Trujillo
date: 2013-12-16 14:54:13.000000000

Change has been successfully merged into the git repository.

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