[libgit2-glib] Bind git_reference_has_log
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Bind git_reference_has_log
- Date: Fri, 5 Jul 2013 10:55:20 +0000 (UTC)
commit 35ff8a20a34ff7ab9ed4b6b045b8ce163e96d8ce
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Fri Jul 5 12:55:10 2013 +0200
Bind git_reference_has_log
libgit2-glib/ggit-ref.c | 17 +++++++++++++++++
libgit2-glib/ggit-ref.h | 2 ++
2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/libgit2-glib/ggit-ref.c b/libgit2-glib/ggit-ref.c
index 894eff5..fb859c1 100644
--- a/libgit2-glib/ggit-ref.c
+++ b/libgit2-glib/ggit-ref.c
@@ -406,6 +406,23 @@ ggit_ref_lookup (GgitRef *ref,
}
/**
+ * ggit_ref_has_reflog:
+ * @ref: a #GgitRef.
+ *
+ * Get whether @ref has an existing reflog.
+ *
+ * Returns: %TRUE if @ref has a reflog, %FALSE otherwise.
+ *
+ **/
+gboolean
+ggit_ref_has_reflog (GgitRef *ref)
+{
+ g_return_val_if_fail (GGIT_IS_REF (ref), FALSE);
+
+ return git_reference_has_log (_ggit_native_get (ref)) == 1;
+}
+
+/**
* ggit_ref_get_reflog:
* @ref: a #GgitRef.
* @error: a #GError for error reporting, or %NULL.
diff --git a/libgit2-glib/ggit-ref.h b/libgit2-glib/ggit-ref.h
index 17ba8c2..1803bf8 100644
--- a/libgit2-glib/ggit-ref.h
+++ b/libgit2-glib/ggit-ref.h
@@ -95,6 +95,8 @@ void ggit_ref_delete (GgitRef *ref,
GgitObject *ggit_ref_lookup (GgitRef *ref,
GError **error);
+gboolean ggit_ref_has_reflog (GgitRef *ref);
+
GgitReflog *ggit_ref_get_reflog (GgitRef *ref,
GError **error);
GgitReflog *ggit_ref_create_reflog (GgitRef *ref,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]