[libgit2-glib] Rename GgitDiff to GgitDiffList
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Rename GgitDiff to GgitDiffList
- Date: Mon, 1 Jul 2013 15:43:45 +0000 (UTC)
commit 2a45d8bb83cb7181a0f441126cfc1056a99c2da8
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Mon Jul 1 09:10:19 2013 +0200
Rename GgitDiff to GgitDiffList
examples/walk.c | 12 +-
libgit2-glib/Makefile.am | 4 +-
libgit2-glib/{ggit-diff.c => ggit-diff-list.c} | 220 ++++++++++++------------
libgit2-glib/ggit-diff-list.h | 135 +++++++++++++++
libgit2-glib/ggit-diff.h | 135 ---------------
libgit2-glib/ggit-types.h | 6 +-
libgit2-glib/ggit.h | 2 +-
7 files changed, 257 insertions(+), 257 deletions(-)
---
diff --git a/examples/walk.c b/examples/walk.c
index cb6729a..8610cab 100644
--- a/examples/walk.c
+++ b/examples/walk.c
@@ -163,19 +163,19 @@ main (int argc,
GgitCommit *parent_commit;
GgitTree *commit_tree;
GgitTree *parent_tree;
- GgitDiff *diff;
+ GgitDiffList *diff;
parent_commit = ggit_commit_parents_get (commit_parents, 0);
commit_tree = ggit_commit_get_tree (commit);
parent_tree = ggit_commit_get_tree (parent_commit);
- diff = ggit_diff_new_tree_to_tree (repo,
- parent_tree,
- commit_tree,
- NULL, &err);
+ diff = ggit_diff_list_new_tree_to_tree (repo,
+ parent_tree,
+ commit_tree,
+ NULL, &err);
g_assert_no_error (err);
- ggit_diff_print_patch (diff, diff_print_cb, NULL, &err);
+ ggit_diff_list_print_patch (diff, diff_print_cb, NULL, &err);
g_assert_no_error (err);
g_object_unref (diff);
diff --git a/libgit2-glib/Makefile.am b/libgit2-glib/Makefile.am
index b38bd4f..3259faa 100644
--- a/libgit2-glib/Makefile.am
+++ b/libgit2-glib/Makefile.am
@@ -27,7 +27,7 @@ INST_H_FILES = \
ggit-config-entry.h \
ggit-cred.h \
ggit-cred-plaintext.h \
- ggit-diff.h \
+ ggit-diff-list.h \
ggit-diff-delta.h \
ggit-diff-file.h \
ggit-diff-options.h \
@@ -79,7 +79,7 @@ C_FILES = \
ggit-convert.c \
ggit-cred.c \
ggit-cred-plaintext.c \
- ggit-diff.c \
+ ggit-diff-list.c \
ggit-diff-delta.c \
ggit-diff-file.c \
ggit-diff-options.c \
diff --git a/libgit2-glib/ggit-diff.c b/libgit2-glib/ggit-diff-list.c
similarity index 73%
rename from libgit2-glib/ggit-diff.c
rename to libgit2-glib/ggit-diff-list.c
index c695b74..1394cd8 100644
--- a/libgit2-glib/ggit-diff.c
+++ b/libgit2-glib/ggit-diff-list.c
@@ -20,7 +20,7 @@
#include <git2.h>
-#include "ggit-diff.h"
+#include "ggit-diff-list.h"
#include "ggit-diff-patch.h"
#include "ggit-diff-delta.h"
#include "ggit-diff-options.h"
@@ -36,7 +36,7 @@ typedef struct {
GgitDiffLineCallback line_cb;
} CallbackWrapperData;
-G_DEFINE_TYPE (GgitDiff, ggit_diff, GGIT_TYPE_NATIVE)
+G_DEFINE_TYPE (GgitDiffList, ggit_diff_list, GGIT_TYPE_NATIVE)
static gint
ggit_diff_file_callback_wrapper (const git_diff_delta *delta,
@@ -110,22 +110,22 @@ ggit_diff_line_callback_wrapper (const git_diff_delta *delta,
}
static void
-ggit_diff_class_init (GgitDiffClass *klass)
+ggit_diff_list_class_init (GgitDiffListClass *klass)
{
}
static void
-ggit_diff_init (GgitDiff *self)
+ggit_diff_list_init (GgitDiffList *self)
{
}
-GgitDiff *
-_ggit_diff_wrap (git_diff_list *diff,
- gboolean owned)
+GgitDiffList *
+_ggit_diff_list_wrap (git_diff_list *diff,
+ gboolean owned)
{
- GgitDiff *gdiff;
+ GgitDiffList *gdiff;
- gdiff = g_object_new (GGIT_TYPE_DIFF, NULL);
+ gdiff = g_object_new (GGIT_TYPE_DIFF_LIST, NULL);
_ggit_native_set (gdiff, diff, NULL);
if (owned)
@@ -138,26 +138,26 @@ _ggit_diff_wrap (git_diff_list *diff,
}
/**
- * ggit_diff_new_tree_to_tree:
+ * ggit_diff_list_new_tree_to_tree:
* @repository: a #GgitRepository.
* @old_tree: (allow-none): a #GgitTree to diff from.
* @new_tree: (allow-none): a #GgitTree to diff to.
* @diff_options: (allow-none): a #GgitDiffOptions, or %NULL.
* @error: a #GError for error reporting, or %NULL.
*
- * Creates a #GgitDiff which compares @old_tree and @new_tree.
+ * Creates a #GgitDiffList which compares @old_tree and @new_tree.
*
* If @diff_options is %NULL then the defaults specified in
* ggit_diff_options_new() are used.
*
- * Returns: a newly allocated #GgitDiff if there was no error, %NULL otherwise.
+ * Returns: a newly allocated #GgitDiffList if there was no error, %NULL otherwise.
*/
-GgitDiff *
-ggit_diff_new_tree_to_tree (GgitRepository *repository,
- GgitTree *old_tree,
- GgitTree *new_tree,
- GgitDiffOptions *diff_options,
- GError **error)
+GgitDiffList *
+ggit_diff_list_new_tree_to_tree (GgitRepository *repository,
+ GgitTree *old_tree,
+ GgitTree *new_tree,
+ GgitDiffOptions *diff_options,
+ GError **error)
{
git_diff_list *diff;
gint ret;
@@ -180,31 +180,31 @@ ggit_diff_new_tree_to_tree (GgitRepository *repository,
return NULL;
}
- return _ggit_diff_wrap (diff, TRUE);
+ return _ggit_diff_list_wrap (diff, TRUE);
}
/**
- * ggit_diff_new_tree_to_index:
+ * ggit_diff_list_new_tree_to_index:
* @repository: a #GgitRepository.
* @old_tree: (allow-none): a #GgitTree to diff from.
* @index: (allow-none): a #GgitIndex, or %NULL.
* @diff_options: (allow-none): a #GgitDiffOptions, or %NULL.
* @error: a #GError for error reporting, or %NULL.
*
- * Creates a #GgitDiff which compares @old_tree and the index.
+ * Creates a #GgitDiffList which compares @old_tree and the index.
*
* If @index is %NULL then @repository index is used.
* If @diff_options is %NULL then the defaults specified in
* ggit_diff_options_new() are used.
*
- * Returns: a newly allocated #GgitDiff if there was no error, %NULL otherwise.
+ * Returns: a newly allocated #GgitDiffList if there was no error, %NULL otherwise.
*/
-GgitDiff *
-ggit_diff_new_tree_to_index (GgitRepository *repository,
- GgitTree *old_tree,
- GgitIndex *index,
- GgitDiffOptions *diff_options,
- GError **error)
+GgitDiffList *
+ggit_diff_list_new_tree_to_index (GgitRepository *repository,
+ GgitTree *old_tree,
+ GgitIndex *index,
+ GgitDiffOptions *diff_options,
+ GError **error)
{
git_diff_list *diff;
gint ret;
@@ -226,29 +226,29 @@ ggit_diff_new_tree_to_index (GgitRepository *repository,
return NULL;
}
- return _ggit_diff_wrap (diff, TRUE);
+ return _ggit_diff_list_wrap (diff, TRUE);
}
/**
- * ggit_diff_new_index_to_workdir:
+ * ggit_diff_list_new_index_to_workdir:
* @repository: a #GgitRepository.
* @index: (allow-none): a #GgitIndex, or %NULL.
* @diff_options: (allow-none): a #GgitDiffOptions, or %NULL.
* @error: a #GError for error reporting, or %NULL.
*
- * Creates a #GgitDiff which compares the working directory and the index.
+ * Creates a #GgitDiffList which compares the working directory and the index.
*
* If @index is %NULL then @repository index is used.
* If @diff_options is %NULL then the defaults specified in
* ggit_diff_options_new() are used.
*
- * Returns: a newly allocated #GgitDiff if there was no error, %NULL otherwise.
+ * Returns: a newly allocated #GgitDiffList if there was no error, %NULL otherwise.
*/
-GgitDiff *
-ggit_diff_new_index_to_workdir (GgitRepository *repository,
- GgitIndex *index,
- GgitDiffOptions *diff_options,
- GError **error)
+GgitDiffList *
+ggit_diff_list_new_index_to_workdir (GgitRepository *repository,
+ GgitIndex *index,
+ GgitDiffOptions *diff_options,
+ GError **error)
{
git_diff_list *diff;
gint ret;
@@ -268,28 +268,28 @@ ggit_diff_new_index_to_workdir (GgitRepository *repository,
return NULL;
}
- return _ggit_diff_wrap (diff, TRUE);
+ return _ggit_diff_list_wrap (diff, TRUE);
}
/**
- * ggit_diff_new_tree_to_workdir:
+ * ggit_diff_list_new_tree_to_workdir:
* @repository: a #GgitRepository.
* @old_tree: (allow-none): a #GgitTree to diff from.
* @diff_options: (allow-none): a #GgitDiffOptions, or %NULL.
* @error: a #GError for error reporting, or %NULL.
*
- * Creates a #GgitDiff which compares the working directory and @old_tree.
+ * Creates a #GgitDiffList which compares the working directory and @old_tree.
*
* If @diff_options is %NULL then the defaults specified in
* ggit_diff_options_new() are used.
*
- * Returns: a newly allocated #GgitDiff if there was no error, %NULL otherwise.
+ * Returns: a newly allocated #GgitDiffList if there was no error, %NULL otherwise.
*/
-GgitDiff *
-ggit_diff_new_tree_to_workdir (GgitRepository *repository,
- GgitTree *old_tree,
- GgitDiffOptions *diff_options,
- GError **error)
+GgitDiffList *
+ggit_diff_list_new_tree_to_workdir (GgitRepository *repository,
+ GgitTree *old_tree,
+ GgitDiffOptions *diff_options,
+ GError **error)
{
git_diff_list *diff;
gint ret;
@@ -309,26 +309,26 @@ ggit_diff_new_tree_to_workdir (GgitRepository *repository,
return NULL;
}
- return _ggit_diff_wrap (diff, TRUE);
+ return _ggit_diff_list_wrap (diff, TRUE);
}
/**
- * ggit_diff_merge:
- * @onto: the #GgitDiff to merge into.
- * @from: the #GgitDiff to merge.
+ * ggit_diff_list_merge:
+ * @onto: the #GgitDiffList to merge into.
+ * @from: the #GgitDiffList to merge.
* @error: a #GError for error reporting, or %NULL.
*
* Merges @from into @onto unless @error is set.
*/
void
-ggit_diff_merge (GgitDiff *onto,
- GgitDiff *from,
- GError **error)
+ggit_diff_list_merge (GgitDiffList *onto,
+ GgitDiffList *from,
+ GError **error)
{
gint ret;
- g_return_if_fail (GGIT_IS_DIFF (onto));
- g_return_if_fail (GGIT_IS_DIFF (from));
+ g_return_if_fail (GGIT_IS_DIFF_LIST (onto));
+ g_return_if_fail (GGIT_IS_DIFF_LIST (from));
g_return_if_fail (error == NULL || *error == NULL);
ret = git_diff_merge (_ggit_native_get (onto),
@@ -341,8 +341,8 @@ ggit_diff_merge (GgitDiff *onto,
}
/**
- * ggit_diff_foreach:
- * @diff: a #GgitDiff.
+ * ggit_diff_list_foreach:
+ * @diff: a #GgitDiffList.
* @file_cb: (allow-none) (scope call) (closure user_data):
* a #GgitDiffFileCallback.
* @hunk_cb: (allow-none) (scope call) (closure user_data):
@@ -355,12 +355,12 @@ ggit_diff_merge (GgitDiff *onto,
* Iterates over the diff calling @file_cb, @hunk_cb and @line_cb.
*/
void
-ggit_diff_foreach (GgitDiff *diff,
- GgitDiffFileCallback file_cb,
- GgitDiffHunkCallback hunk_cb,
- GgitDiffLineCallback line_cb,
- gpointer *user_data,
- GError **error)
+ggit_diff_list_foreach (GgitDiffList *diff,
+ GgitDiffFileCallback file_cb,
+ GgitDiffHunkCallback hunk_cb,
+ GgitDiffLineCallback line_cb,
+ gpointer *user_data,
+ GError **error)
{
gint ret;
CallbackWrapperData wrapper_data;
@@ -368,7 +368,7 @@ ggit_diff_foreach (GgitDiff *diff,
git_diff_hunk_cb real_hunk_cb = NULL;
git_diff_data_cb real_line_cb = NULL;
- g_return_if_fail (GGIT_IS_DIFF (diff));
+ g_return_if_fail (GGIT_IS_DIFF_LIST (diff));
g_return_if_fail (file_cb != NULL && hunk_cb != NULL && line_cb != NULL);
g_return_if_fail (error == NULL || *error == NULL);
@@ -403,8 +403,8 @@ ggit_diff_foreach (GgitDiff *diff,
}
/**
- * ggit_diff_print_compact:
- * @diff: a #GgitDiff.
+ * ggit_diff_list_print_compact:
+ * @diff: a #GgitDiffList.
* @print_cb: (scope call) (closure user_data): a #GgitDiffLineCallback.
* @user_data: callback user data.
* @error: a #GError for error reporting, or %NULL.
@@ -412,15 +412,15 @@ ggit_diff_foreach (GgitDiff *diff,
* Iterates over @diff generating text output like "git diff --name-status".
*/
void
-ggit_diff_print_compact (GgitDiff *diff,
- GgitDiffLineCallback print_cb,
- gpointer *user_data,
- GError **error)
+ggit_diff_list_print_compact (GgitDiffList *diff,
+ GgitDiffLineCallback print_cb,
+ gpointer *user_data,
+ GError **error)
{
gint ret;
CallbackWrapperData wrapper_data;
- g_return_if_fail (GGIT_IS_DIFF (diff));
+ g_return_if_fail (GGIT_IS_DIFF_LIST (diff));
g_return_if_fail (print_cb != NULL);
g_return_if_fail (error == NULL || *error == NULL);
@@ -438,8 +438,8 @@ ggit_diff_print_compact (GgitDiff *diff,
}
/**
- * ggit_diff_print_patch:
- * @diff: a #GgitDiff.
+ * ggit_diff_list_print_patch:
+ * @diff: a #GgitDiffList.
* @print_cb: (scope call) (closure user_data): a #GgitDiffLineCallback.
* @user_data: callback user data.
* @error: a #GError for error reporting, or %NULL.
@@ -447,15 +447,15 @@ ggit_diff_print_compact (GgitDiff *diff,
* Iterates over @diff generating text output like "git diff".
*/
void
-ggit_diff_print_patch (GgitDiff *diff,
- GgitDiffLineCallback print_cb,
- gpointer *user_data,
- GError **error)
+ggit_diff_list_print_patch (GgitDiffList *diff,
+ GgitDiffLineCallback print_cb,
+ gpointer *user_data,
+ GError **error)
{
gint ret;
CallbackWrapperData wrapper_data;
- g_return_if_fail (GGIT_IS_DIFF (diff));
+ g_return_if_fail (GGIT_IS_DIFF_LIST (diff));
g_return_if_fail (print_cb != NULL);
g_return_if_fail (error == NULL || *error == NULL);
@@ -473,8 +473,8 @@ ggit_diff_print_patch (GgitDiff *diff,
}
/**
- * ggit_diff_get_patch:
- * @diff: a #GgitDiff.
+ * ggit_diff_list_get_patch:
+ * @diff: a #GgitDiffList.
* @idx: index into @diff.
* @patch: (allow-none): a #GgitDiffPatch or %NULL.
* @delta: (allow-none): a #GgitDiffDelta or %NULL.
@@ -495,17 +495,17 @@ ggit_diff_print_patch (GgitDiff *diff,
* %NULL for @patch, then the text diff will not be calculated.
*/
void
-ggit_diff_get_patch (GgitDiff *diff,
- gsize idx,
- GgitDiffPatch **patch,
- GgitDiffDelta **delta,
- GError **error)
+ggit_diff_list_get_patch (GgitDiffList *diff,
+ gsize idx,
+ GgitDiffPatch **patch,
+ GgitDiffDelta **delta,
+ GError **error)
{
gint ret;
const git_diff_delta *delta_out;
git_diff_patch *patch_out = NULL;
- g_return_if_fail (GGIT_IS_DIFF (diff));
+ g_return_if_fail (GGIT_IS_DIFF_LIST (diff));
g_return_if_fail (error == NULL || *error == NULL);
ret = git_diff_get_patch (patch ? &patch_out : NULL,
@@ -531,7 +531,7 @@ ggit_diff_get_patch (GgitDiff *diff,
}
/**
- * ggit_diff_blobs:
+ * ggit_diff_list_blobs:
* @old_blob: (allow-none): a #GgitBlob to diff from.
* @old_as_path: (allow-none): treat @old_blob as if it had this filename, or %NULL,
* @new_blob: (allow-none): a #GgitBlob to diff to.
@@ -555,16 +555,16 @@ ggit_diff_get_patch (GgitDiff *diff,
* ggit_diff_options_new() are used.
*/
void
-ggit_diff_blobs (GgitBlob *old_blob,
- const gchar *old_as_path,
- GgitBlob *new_blob,
- const gchar *new_as_path,
- GgitDiffOptions *diff_options,
- GgitDiffFileCallback file_cb,
- GgitDiffHunkCallback hunk_cb,
- GgitDiffLineCallback line_cb,
- gpointer *user_data,
- GError **error)
+ggit_diff_list_blobs (GgitBlob *old_blob,
+ const gchar *old_as_path,
+ GgitBlob *new_blob,
+ const gchar *new_as_path,
+ GgitDiffOptions *diff_options,
+ GgitDiffFileCallback file_cb,
+ GgitDiffHunkCallback hunk_cb,
+ GgitDiffLineCallback line_cb,
+ gpointer *user_data,
+ GError **error)
{
gint ret;
const git_diff_options *gdiff_options;
@@ -612,7 +612,7 @@ ggit_diff_blobs (GgitBlob *old_blob,
}
/**
- * ggit_diff_blob_to_buffer:
+ * ggit_diff_list_blob_to_buffer:
* @old_blob: (allow-none): a #GgitBlob to diff from.
* @old_as_path: (allow-none): treat @old_blob as if it had this filename, or %NULL,
* @buffer: (allow-none) (array length=buffer_len): a buffer to diff to.
@@ -628,20 +628,20 @@ ggit_diff_blobs (GgitBlob *old_blob,
* @user_data: callback user data.
* @error: a #GError for error reporting, or %NULL.
*
- * Same as ggit_diff_blobs() but using a buffer.
+ * Same as ggit_diff_list_blobs() but using a buffer.
*/
void
-ggit_diff_blob_to_buffer (GgitBlob *old_blob,
- const gchar *old_as_path,
- const gchar *buffer,
- gsize buffer_len,
- const gchar *buffer_as_path,
- GgitDiffOptions *diff_options,
- GgitDiffFileCallback file_cb,
- GgitDiffHunkCallback hunk_cb,
- GgitDiffLineCallback line_cb,
- gpointer *user_data,
- GError **error)
+ggit_diff_list_blob_to_buffer (GgitBlob *old_blob,
+ const gchar *old_as_path,
+ const gchar *buffer,
+ gsize buffer_len,
+ const gchar *buffer_as_path,
+ GgitDiffOptions *diff_options,
+ GgitDiffFileCallback file_cb,
+ GgitDiffHunkCallback hunk_cb,
+ GgitDiffLineCallback line_cb,
+ gpointer *user_data,
+ GError **error)
{
gint ret;
const git_diff_options *gdiff_options;
diff --git a/libgit2-glib/ggit-diff-list.h b/libgit2-glib/ggit-diff-list.h
new file mode 100644
index 0000000..8e8f726
--- /dev/null
+++ b/libgit2-glib/ggit-diff-list.h
@@ -0,0 +1,135 @@
+/*
+ * ggit-diff.h
+ * This file is part of libgit2-glib
+ *
+ * Copyright (C) 2012 - Garrett Regier
+ *
+ * libgit2-glib is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * libgit2-glib is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with libgit2-glib. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GGIT_DIFF_LIST_H__
+#define __GGIT_DIFF_LIST_H__
+
+#include <git2.h>
+#include "ggit-native.h"
+#include "ggit-types.h"
+
+G_BEGIN_DECLS
+
+#define GGIT_TYPE_DIFF_LIST (ggit_diff_list_get_type ())
+#define GGIT_DIFF_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGIT_TYPE_DIFF_LIST,
GgitDiffList))
+#define GGIT_DIFF_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GGIT_TYPE_DIFF_LIST,
GgitDiffListClass))
+#define GGIT_IS_DIFF_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGIT_TYPE_DIFF_LIST))
+#define GGIT_IS_DIFF_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGIT_TYPE_DIFF_LIST))
+#define GGIT_DIFF_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GGIT_TYPE_DIFF_LIST,
GgitDiffListClass))
+
+typedef struct _GgitDiffListClass GgitDiffListClass;
+
+struct _GgitDiffList
+{
+ /*< private >*/
+ GgitNative parent;
+
+ /* priv padding */
+ gpointer priv;
+};
+
+/**
+ * GgitDiffListClass:
+ * @parent_class: The parent class.
+ *
+ * The class structure for #GgitDiffListClass.
+ */
+struct _GgitDiffListClass
+{
+ /*< private >*/
+ GgitNativeClass parent_class;
+};
+
+GType ggit_diff_list_get_type (void) G_GNUC_CONST;
+
+GgitDiffList *_ggit_diff_list_wrap (git_diff_list *diff,
+ gboolean owned);
+
+GgitDiffList *ggit_diff_list_new_tree_to_tree (GgitRepository *repository,
+ GgitTree *old_tree,
+ GgitTree *new_tree,
+ GgitDiffOptions *diff_options,
+ GError **error);
+GgitDiffList *ggit_diff_list_new_tree_to_index (GgitRepository *repository,
+ GgitTree *old_tree,
+ GgitIndex *index,
+ GgitDiffOptions *diff_options,
+ GError **error);
+GgitDiffList *ggit_diff_list_new_index_to_workdir (GgitRepository *repository,
+ GgitIndex *index,
+ GgitDiffOptions *diff_options,
+ GError **error);
+GgitDiffList *ggit_diff_list_new_tree_to_workdir (GgitRepository *repository,
+ GgitTree *old_tree,
+ GgitDiffOptions *diff_options,
+ GError **error);
+
+void ggit_diff_list_merge (GgitDiffList *onto,
+ GgitDiffList *from,
+ GError **error);
+
+void ggit_diff_list_foreach (GgitDiffList *diff,
+ GgitDiffFileCallback file_cb,
+ GgitDiffHunkCallback hunk_cb,
+ GgitDiffLineCallback line_cb,
+ gpointer *user_data,
+ GError **error);
+void ggit_diff_list_print_compact (GgitDiffList *diff,
+ GgitDiffLineCallback print_cb,
+ gpointer *user_data,
+ GError **error);
+void ggit_diff_list_print_patch (GgitDiffList *diff,
+ GgitDiffLineCallback print_cb,
+ gpointer *user_data,
+ GError **error);
+void ggit_diff_list_get_patch (GgitDiffList *diff,
+ gsize idx,
+ GgitDiffPatch **patch,
+ GgitDiffDelta **delta,
+ GError **error);
+
+void ggit_diff_list_blobs (GgitBlob *old_blob,
+ const gchar *old_as_path,
+ GgitBlob *new_blob,
+ const gchar *new_as_path,
+ GgitDiffOptions *diff_options,
+ GgitDiffFileCallback file_cb,
+ GgitDiffHunkCallback hunk_cb,
+ GgitDiffLineCallback line_cb,
+ gpointer *user_data,
+ GError **error);
+
+void ggit_diff_list_blob_to_buffer (GgitBlob *old_blob,
+ const gchar *old_as_path,
+ const gchar *buffer,
+ gsize buffer_len,
+ const gchar *buffer_as_path,
+ GgitDiffOptions *diff_options,
+ GgitDiffFileCallback file_cb,
+ GgitDiffHunkCallback hunk_cb,
+ GgitDiffLineCallback line_cb,
+ gpointer *user_data,
+ GError **error);
+
+G_END_DECLS
+
+#endif /* __GGIT_DIFF_LIST_H__ */
+
+/* ex:set ts=8 noet: */
diff --git a/libgit2-glib/ggit-types.h b/libgit2-glib/ggit-types.h
index e7c4183..0119428 100644
--- a/libgit2-glib/ggit-types.h
+++ b/libgit2-glib/ggit-types.h
@@ -96,11 +96,11 @@ typedef struct _GgitCred GgitCred;
typedef struct _GgitCredPlaintext GgitCredPlaintext;
/**
- * GgitDiff:
+ * GgitDiffList:
*
- * Represents a diff.
+ * Represents a diff list.
*/
-typedef struct _GgitDiff GgitDiff;
+typedef struct _GgitDiffList GgitDiffList;
/**
* GgitDiffDelta:
diff --git a/libgit2-glib/ggit.h b/libgit2-glib/ggit.h
index 7bb16fd..dda6353 100644
--- a/libgit2-glib/ggit.h
+++ b/libgit2-glib/ggit.h
@@ -30,7 +30,7 @@
#include <libgit2-glib/ggit-config-entry.h>
#include <libgit2-glib/ggit-cred.h>
#include <libgit2-glib/ggit-cred-plaintext.h>
-#include <libgit2-glib/ggit-diff.h>
+#include <libgit2-glib/ggit-diff-list.h>
#include <libgit2-glib/ggit-diff-delta.h>
#include <libgit2-glib/ggit-diff-file.h>
#include <libgit2-glib/ggit-diff-options.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]