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: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>