You test for this scenario: 

newLocation: C:/Eclipse/workspaces/junit-workspace/P2
gitDir: C:/Eclipse/workspaces/junit-workspace/Project-1/.git

The condition would also apply if we moved a project from within a repository to a location below the folder containing the repo: 

newLocation: C:/myfolder/P2
gitDir: C:/myfolder/myrepo/.git
sourceLocation: C:/myfolder/myrepo/Project-1

But moving projects outside of the repo never had worked before, therefore we may ignore this one here.