String repoName = path.substring(gitPrefixIdx + "_git/".length());
- return new VcsHostingRepo("https://" + host + "/_git/" + repoName, owner, repoName);
+ return new VcsHostingRepo("https://" + host + path, owner, repoName);
}
private static VcsHostingRepo ownerProjectStyleRepo(@NotNull String hostingUrl, @NotNull URIish uri) {
assertEquals("spav5", repo.owner());
assertEquals("MyFirstProject", repo.repoName());
}
+
+ public void test_vsts_nested_project() throws URISyntaxException {
+ String url = "https://spav5.visualstudio.com/MyProject/_git/MyFirstProject";
+ VcsHostingRepo repo = WellKnownHostingsUtil.getVSTSRepo(new URIish(url));
+ assertNotNull(repo);
+ assertEquals("https://spav5.visualstudio.com/MyProject/_git/MyFirstProject", repo.repositoryUrl());
+ assertEquals("spav5", repo.owner());
+ assertEquals("MyFirstProject", repo.repoName());
+ }
}