return props;
try {
+ if (!fetchUrl.endsWith(".git")) {
+ props.put(Constants.FETCH_URL, fetchUrl + ".git");
+ }
+
myGitSupport.testConnection(new VcsRootImpl(-1, Constants.VCS_NAME, props));
return props;
} catch (VcsException e) {
assertEquals("pwd1", root.getProperty(Constants.PASSWORD));
}
+ @Test
+ public void url_without_git_suffix() throws Exception {
+ VcsUrl url = new VcsUrl("https://github.com/hhariri/wasabi");
+ GitVcsRoot root = toGitRoot(url);
+
+ assertEquals("https://github.com/hhariri/wasabi.git", root.getProperty(Constants.FETCH_URL));
+ }
+
@Test
public void http_protocol_svn_repo() throws Exception {
VcsUrl url = new VcsUrl("http://svn.jetbrains.org/teamcity/plugins/xml-tests-reporting/trunk/");