[libgit2-glib] Fix changes to reflog API no longer being based on git_reference
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Fix changes to reflog API no longer being based on git_reference
- Date: Fri, 22 Nov 2013 18:27:02 +0000 (UTC)
commit 4604c4c7434e556c7cf0be3cbccc1744ed3477a2
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Fri Nov 22 19:26:31 2013 +0100
Fix changes to reflog API no longer being based on git_reference
libgit2-glib/ggit-ref.c | 13 +++++++++++--
libgit2-glib/ggit-reflog.c | 7 ++++++-
2 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/libgit2-glib/ggit-ref.c b/libgit2-glib/ggit-ref.c
index 7824297..4c2fbb0 100644
--- a/libgit2-glib/ggit-ref.c
+++ b/libgit2-glib/ggit-ref.c
@@ -437,12 +437,17 @@ ggit_ref_get_reflog (GgitRef *ref,
GError **error)
{
git_reflog *reflog;
+ git_reference *nref;
gint ret;
g_return_val_if_fail (GGIT_IS_REF (ref), NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
- ret = git_reflog_read (&reflog, _ggit_native_get (ref));
+ nref = _ggit_native_get (ref);
+
+ ret = git_reflog_read (&reflog,
+ git_reference_owner (nref),
+ git_reference_name (nref));
if (ret != GIT_OK)
{
@@ -464,12 +469,16 @@ void
ggit_ref_delete_reflog (GgitRef *ref,
GError **error)
{
+ git_reference *nref;
gint ret;
g_return_if_fail (GGIT_IS_REF (ref));
g_return_if_fail (error == NULL || *error == NULL);
- ret = git_reflog_delete (_ggit_native_get (ref));
+ nref = _ggit_native_get (ref);
+
+ ret = git_reflog_delete (git_reference_owner (nref),
+ git_reference_name (nref));
if (ret != GIT_OK)
{
diff --git a/libgit2-glib/ggit-reflog.c b/libgit2-glib/ggit-reflog.c
index 1d0f2db..061875f 100644
--- a/libgit2-glib/ggit-reflog.c
+++ b/libgit2-glib/ggit-reflog.c
@@ -176,13 +176,18 @@ ggit_reflog_rename (GgitReflog *reflog,
const gchar *new_name,
GError **error)
{
+ git_reference *nref;
gint ret;
g_return_val_if_fail (reflog != NULL, FALSE);
g_return_val_if_fail (new_name != NULL && *new_name != '\0', FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
- ret = git_reflog_rename (_ggit_native_get (reflog->ref), new_name);
+ nref = _ggit_native_get (reflog->ref);
+
+ ret = git_reflog_rename (git_reference_owner (nref),
+ git_reference_name (nref),
+ new_name);
if (ret != GIT_OK)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]