I've been looking into a fix for https://issuetracker.springsource.com/browse/STS-3018 where the git setup command fails with the STS integration. This bug report was originally spawned from
ROO-3172. When git setup is run for the first time it appears to succeed, but subsequent git operations are not available. Running git setup again says the repository already exists.
While I was hoping to find an STS specific fix, I think this requires a change in the git addon itself. I've observed that running git setup in STS creates a .git directory at /Applications/Eclipse42/Eclipse.app/Contents/MacOS instead of at the project directory. GitOperationsImpl#setUp calls new File(".", Constants.DOT_GIT) to set the .git directory relative to the directory the Roo process is running in. That should always work for the CLI, but because the STS integration runs Roo within a thread of the Eclipse process, that puts .git under the directory where the eclipse executable resides!
Can GitOperationsImpl use its PathResolver to determine the correct path to set the .git directory at, the same way it already does the hasDotGit() check?