[libgit2-glib/wip/development] Start updating bindings to the latest libgit2 API changes



commit 3a233a55299a0f20616cb11a328c96d4080f5c42
Author: Sindhu S <sindhus live in>
Date:   Wed Jun 5 01:39:31 2013 +0530

    Start updating bindings to the latest libgit2 API changes

 docs/reference/libgit2-glib-1.0-sections.txt |    2 +-
 libgit2-glib/ggit-index-entry-resolve-undo.c |    1 +
 libgit2-glib/ggit-remote.c                   |   33 +++----------------------
 libgit2-glib/ggit-remote.h                   |    2 +-
 4 files changed, 7 insertions(+), 31 deletions(-)
---
diff --git a/docs/reference/libgit2-glib-1.0-sections.txt b/docs/reference/libgit2-glib-1.0-sections.txt
index ac8a16f..75920ba 100644
--- a/docs/reference/libgit2-glib-1.0-sections.txt
+++ b/docs/reference/libgit2-glib-1.0-sections.txt
@@ -588,7 +588,7 @@ ggit_remote_get_url
 ggit_remote_connect
 ggit_remote_get_connected
 ggit_remote_disconnect
-ggit_remote_set_fetch_spec
+ggit_remote_add_fetch_spec
 ggit_remote_get_fetch_spec
 ggit_remote_set_push_spec
 ggit_remote_get_push_spec
diff --git a/libgit2-glib/ggit-index-entry-resolve-undo.c b/libgit2-glib/ggit-index-entry-resolve-undo.c
index 70a383d..0d344b8 100644
--- a/libgit2-glib/ggit-index-entry-resolve-undo.c
+++ b/libgit2-glib/ggit-index-entry-resolve-undo.c
@@ -20,6 +20,7 @@
 
 #include "ggit-index-entry-resolve-undo.h"
 #include "ggit-index.h"
+#include <git2/sys/index.h>
 
 struct _GgitIndexEntriesResolveUndo
 {
diff --git a/libgit2-glib/ggit-remote.c b/libgit2-glib/ggit-remote.c
index de5c4ff..66411e7 100644
--- a/libgit2-glib/ggit-remote.c
+++ b/libgit2-glib/ggit-remote.c
@@ -239,7 +239,7 @@ ggit_remote_disconnect (GgitRemote *remote)
 }
 
 /**
- * ggit_remote_set_fetch_spec:
+ * ggit_remote_add_fetch_spec:
  * @remote: a #GgitRemote.
  * @fetch_spec: the fetch refspec.
  * @error: a #GError for error reporting, or %NULL.
@@ -247,7 +247,7 @@ ggit_remote_disconnect (GgitRemote *remote)
  * Sets @remote's fetch spec to @fetch_spec.
  */
 void
-ggit_remote_set_fetch_spec (GgitRemote   *remote,
+ggit_remote_add_fetch_spec (GgitRemote   *remote,
                             const gchar  *fetch_spec,
                             GError      **error)
 {
@@ -257,7 +257,7 @@ ggit_remote_set_fetch_spec (GgitRemote   *remote,
        g_return_if_fail (fetch_spec != NULL && fetch_spec[0] != '\0');
        g_return_if_fail (error == NULL || *error == NULL);
 
-       ret = git_remote_set_fetchspec (remote->remote, fetch_spec);
+       ret = git_remote_add_fetch (remote->remote, fetch_spec);
 
        if (ret != GIT_OK)
        {
@@ -309,7 +309,7 @@ ggit_remote_set_push_spec (GgitRemote   *remote,
        g_return_if_fail (push_spec != NULL && push_spec[0] != '\0');
        g_return_if_fail (error == NULL || *error == NULL);
 
-       ret = git_remote_set_pushspec (remote->remote, push_spec);
+       ret = git_remote_add_push (remote->remote, push_spec);
 
        if (ret != GIT_OK)
        {
@@ -317,31 +317,6 @@ ggit_remote_set_push_spec (GgitRemote   *remote,
        }
 }
 
-/**
- * ggit_remote_get_push_spec:
- * @remote: a #GgitRemote.
- *
- * Gets @remote's push spec.
- *
- * Returns: the push spec of the remote, or %NULL.
- */
-GgitRefSpec *
-ggit_remote_get_push_spec (GgitRemote *remote)
-{
-       const git_refspec *refspec;
-
-       g_return_val_if_fail (remote != NULL, NULL);
-
-       refspec = git_remote_pushspec (remote->remote);
-
-       if (refspec == NULL)
-       {
-               return NULL;
-       }
-
-       return _ggit_ref_spec_wrap (refspec);
-}
-
 typedef struct {
        GgitRemoteListCallback callback;
        gpointer user_data;
diff --git a/libgit2-glib/ggit-remote.h b/libgit2-glib/ggit-remote.h
index 3539dd7..d2d92c0 100644
--- a/libgit2-glib/ggit-remote.h
+++ b/libgit2-glib/ggit-remote.h
@@ -58,7 +58,7 @@ gboolean           ggit_remote_get_connected            (GgitRemote       *remot
 
 void               ggit_remote_disconnect               (GgitRemote       *remote);
 
-void               ggit_remote_set_fetch_spec           (GgitRemote       *remote,
+void               ggit_remote_add_fetch_spec           (GgitRemote       *remote,
                                                          const gchar      *fetch_spec,
                                                          GError          **error);
 GgitRefSpec       *ggit_remote_get_fetch_spec           (GgitRemote       *remote);


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