output=NULL;// a match was not found - it's probably a file system path
else
output=&git_transport_git;// a match was found!
cleanup:
regfree(&preg);
/* It could be a SSH remote path. Check to see if there's a : */
if(strrchr(url,':'))
return&git_transport_dummy;/* SSH is an unsupported transport mechanism in this version of libgit2 */
returnoutput;
returnNULL;
}
/**************
...
...
@@ -79,12 +66,8 @@ int git_transport_new(git_transport **out, const char *url)
fn=transport_find_fn(url);
/*
* If we haven't found the transport, we assume we mean a
* local file.
*/
if(fn==NULL)
fn=&git_transport_local;
returngit__throw(GIT_EINVALIDARGS,"No supported transport mechanism found for URL or path. Either libgit2 has not implemented this transport protocol, or it can not find the specified path.");