[libgit2-glib] remote: fix api break



commit 306406de0ee3d07d0ef36fab870a5828897c125f
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Mar 14 23:56:01 2016 +0100

    remote: fix api break

 libgit2-glib/ggit-remote.c |    8 +++++++-
 libgit2-glib/ggit-remote.h |    1 +
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/libgit2-glib/ggit-remote.c b/libgit2-glib/ggit-remote.c
index ab9a949..2bd5d76 100644
--- a/libgit2-glib/ggit-remote.c
+++ b/libgit2-glib/ggit-remote.c
@@ -294,6 +294,7 @@ ggit_remote_get_url (GgitRemote *remote)
  * @remote: a #GgitRemote.
  * @direction: whether you want to receive or send data.
  * @callbacks: the callbacks to use for this connection.
+ * @custom_headers: extra HTTP headers to use in this connection.
  * @error: a #GError for error reporting, or %NULL.
  *
  * Opens a connection to a remote.
@@ -305,16 +306,21 @@ void
 ggit_remote_connect (GgitRemote           *remote,
                      GgitDirection         direction,
                      GgitRemoteCallbacks  *callbacks,
+                     const gchar * const  *custom_headers,
                      GError              **error)
 {
        gint ret;
+       git_strarray headers;
 
        g_return_if_fail (GGIT_IS_REMOTE (remote));
        g_return_if_fail (error == NULL || *error == NULL);
 
+       ggit_utils_get_git_strarray_from_str_array (custom_headers, &headers);
+
        ret = git_remote_connect (_ggit_native_get (remote),
                                  (git_direction)direction,
-                                 _ggit_remote_callbacks_get_native (callbacks));
+                                 _ggit_remote_callbacks_get_native (callbacks),
+                                 &headers);
 
        if (ret != GIT_OK)
        {
diff --git a/libgit2-glib/ggit-remote.h b/libgit2-glib/ggit-remote.h
index 53fa205..96af972 100644
--- a/libgit2-glib/ggit-remote.h
+++ b/libgit2-glib/ggit-remote.h
@@ -74,6 +74,7 @@ const gchar       *ggit_remote_get_url                  (GgitRemote       *remot
 void               ggit_remote_connect                  (GgitRemote           *remote,
                                                          GgitDirection         direction,
                                                          GgitRemoteCallbacks  *callbacks,
+                                                         const gchar * const  *custom_headers,
                                                          GError              **error);
 
 gboolean           ggit_remote_get_connected            (GgitRemote       *remote);


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