[libgit2-glib] Added ggit_remote_is_supported_url()



commit 09bdcc281f1c54fccea63b6c7749b8d334c3470a
Author: Garrett Regier <garrettregier gmail com>
Date:   Wed Jun 13 07:35:30 2012 -0700

    Added ggit_remote_is_supported_url()

 docs/reference/libgit2-glib-1.0-sections.txt |    1 +
 libgit2-glib/ggit-remote.c                   |   16 ++++++++++++++++
 libgit2-glib/ggit-remote.h                   |    1 +
 3 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/libgit2-glib-1.0-sections.txt b/docs/reference/libgit2-glib-1.0-sections.txt
index 1649f93..1bf1c9d 100644
--- a/docs/reference/libgit2-glib-1.0-sections.txt
+++ b/docs/reference/libgit2-glib-1.0-sections.txt
@@ -415,6 +415,7 @@ ggit_remote_connect
 ggit_remote_get_connected
 ggit_remote_disconnect
 ggit_remote_is_valid_url
+ggit_remote_is_supported_url
 <SUBSECTION Standard>
 GGIT_REMOTE
 GGIT_TYPE_REMOTE
diff --git a/libgit2-glib/ggit-remote.c b/libgit2-glib/ggit-remote.c
index 06e2a57..8bf5fb2 100644
--- a/libgit2-glib/ggit-remote.c
+++ b/libgit2-glib/ggit-remote.c
@@ -214,4 +214,20 @@ ggit_remote_is_valid_url (const gchar *url)
 	return git_remote_valid_url (url);
 }
 
+/**
+ * ggit_remote_is_supported_url:
+ * @url: a url string.
+ *
+ * Checks if @url is a supported remote URL.
+ *
+ * Returns: whether a string is a supported remote URL.
+ */
+gboolean
+ggit_remote_is_supported_url (const gchar *url)
+{
+	g_return_val_if_fail (url != NULL, FALSE);
+
+	return git_remote_supported_url (url);
+}
+
 /* ex:set ts=8 noet: */
diff --git a/libgit2-glib/ggit-remote.h b/libgit2-glib/ggit-remote.h
index bbf98d9..bce6681 100644
--- a/libgit2-glib/ggit-remote.h
+++ b/libgit2-glib/ggit-remote.h
@@ -54,6 +54,7 @@ gboolean           ggit_remote_get_connected            (GgitRemote       *remot
 void               ggit_remote_disconnect               (GgitRemote       *remote);
 
 gboolean           ggit_remote_is_valid_url             (const gchar      *url);
+gboolean           ggit_remote_is_supported_url         (const gchar      *url);
 
 G_END_DECLS
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]