[libgit2-glib] Bind git_diff_num_deltas



commit 427082c35687f930e312af15c769b079eb96fb8d
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Mon Jul 8 12:55:58 2013 +0200

    Bind git_diff_num_deltas

 libgit2-glib/ggit-diff-list.c |   17 +++++++++++++++++
 libgit2-glib/ggit-diff-list.h |    3 +++
 2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/libgit2-glib/ggit-diff-list.c b/libgit2-glib/ggit-diff-list.c
index 4b86e3d..06aa1ce 100644
--- a/libgit2-glib/ggit-diff-list.c
+++ b/libgit2-glib/ggit-diff-list.c
@@ -473,6 +473,23 @@ ggit_diff_list_print_patch (GgitDiffList          *diff,
 }
 
 /**
+ * ggit_diff_list_get_num_deltas:
+ * @diff: a #GgitDiffList.
+ *
+ * Get the number of deltas in the diff list.
+ *
+ * Returns: the number of deltas.
+ *
+ **/
+gint
+ggit_diff_list_get_num_deltas (GgitDiffList *diff)
+{
+       g_return_val_if_fail (GGIT_IS_DIFF_LIST (diff), 0);
+
+       return git_diff_num_deltas (_ggit_native_get (diff));
+}
+
+/**
  * ggit_diff_list_get_patch:
  * @diff: a #GgitDiffList.
  * @idx: index into @diff.
diff --git a/libgit2-glib/ggit-diff-list.h b/libgit2-glib/ggit-diff-list.h
index f9c582a..30dbf40 100644
--- a/libgit2-glib/ggit-diff-list.h
+++ b/libgit2-glib/ggit-diff-list.h
@@ -99,6 +99,9 @@ void           ggit_diff_list_print_patch          (GgitDiffList          *diff,
                                                     GgitDiffLineCallback   print_cb,
                                                     gpointer              *user_data,
                                                     GError               **error);
+
+gint           ggit_diff_list_get_num_deltas       (GgitDiffList          *diff);
+
 void           ggit_diff_list_get_patch            (GgitDiffList          *diff,
                                                     gsize                  idx,
                                                     GgitDiffPatch        **patch,


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