[libgit2-glib/wip/development] Start updating bindings to the latest libgit2 API changes
- From: Sindhu S <sindhus src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib/wip/development] Start updating bindings to the latest libgit2 API changes
- Date: Tue, 4 Jun 2013 20:22:43 +0000 (UTC)
commit 206ba70f189f1d3af3f0a3e240262b6cfd85276f
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 | 3 +-
libgit2-glib/ggit-index-entry-resolve-undo.c | 1 +
libgit2-glib/ggit-remote.c | 33 +++----------------------
libgit2-glib/ggit-remote.h | 3 +-
4 files changed, 7 insertions(+), 33 deletions(-)
---
diff --git a/docs/reference/libgit2-glib-1.0-sections.txt b/docs/reference/libgit2-glib-1.0-sections.txt
index ac8a16f..788d712 100644
--- a/docs/reference/libgit2-glib-1.0-sections.txt
+++ b/docs/reference/libgit2-glib-1.0-sections.txt
@@ -588,10 +588,9 @@ 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
ggit_remote_list
ggit_remote_is_valid_url
ggit_remote_is_supported_url
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..e4596f4 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);
@@ -66,7 +66,6 @@ GgitRefSpec *ggit_remote_get_fetch_spec (GgitRemote *remot
void ggit_remote_set_push_spec (GgitRemote *remote,
const gchar *push_spec,
GError **error);
-GgitRefSpec *ggit_remote_get_push_spec (GgitRemote *remote);
void ggit_remote_list (GgitRemote *remote,
GgitRemoteListCallback callback,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]