Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport.c')
-rw-r--r--src/transport.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/transport.c b/src/transport.c
index ff926b1be..2194b1864 100644
--- a/src/transport.c
+++ b/src/transport.c
@@ -79,12 +79,8 @@ static int transport_find_fn(const char *url, git_transport_cb *callback, void *
/* Check to see if the path points to a file on the local file system */
if (!definition && git_path_exists(url) && git_path_isdir(url))
definition = &local_transport_definition;
+#endif
- /* It could be a SSH remote path. Check to see if there's a :
- * SSH is an unsupported transport mechanism in this version of libgit2 */
- if (!definition && strrchr(url, ':'))
- definition = &dummy_transport_definition;
-#else
/* For other systems, perform the SSH check first, to avoid going to the
* filesystem if it is not necessary */
@@ -97,6 +93,7 @@ static int transport_find_fn(const char *url, git_transport_cb *callback, void *
definition = &dummy_transport_definition;
#endif
+#ifndef GIT_WIN32
/* Check to see if the path points to a file on the local file system */
if (!definition && git_path_exists(url) && git_path_isdir(url))
definition = &local_transport_definition;
@@ -220,3 +217,10 @@ int git_remote_supported_url(const char* url)
return fn != &git_transport_dummy;
}
+
+int git_transport_init(git_transport *opts, unsigned int version)
+{
+ GIT_INIT_STRUCTURE_FROM_TEMPLATE(
+ opts, version, git_transport, GIT_TRANSPORT_INIT);
+ return 0;
+}