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:
authorRyan Wilcox <rwilcox@wilcoxd.com>2012-03-01 17:31:50 +0400
committerRyan Wilcox <rwilcox@wilcoxd.com>2012-03-01 17:31:50 +0400
commit7a5449662972769b6b09540463d8b6378664393a (patch)
tree551170803172ceb3a2aed0b30a46e4fc5d70a4d8 /src/transport.c
parent253d6df5fd899ca9273b73a919ec5f19f0ff2df4 (diff)
introduced new function: git_remote_supported_url() <-- returns true if this version of libgit2 supports the correct transport mechanism for a URL or path
Diffstat (limited to 'src/transport.c')
-rw-r--r--src/transport.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/transport.c b/src/transport.c
index e6ba0758b..cd1fd88b5 100644
--- a/src/transport.c
+++ b/src/transport.c
@@ -88,3 +88,9 @@ int git_remote_valid_url(const char *url)
return transport_find_fn(url) != NULL;
}
+int git_remote_supported_url(const char* url)
+{
+ git_transport_cb transport_fn = transport_find_fn(url);
+
+ return ((transport_fn != NULL) && (transport_fn != &git_transport_dummy));
+}