[libgit2-glib] Add GgitBinaryType enum
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Add GgitBinaryType enum
- Date: Tue, 30 Jun 2015 19:18:03 +0000 (UTC)
commit dd0cfab3b426fa8fb7f364c8788acb9cb2caead5
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Tue Jun 30 20:02:36 2015 +0200
Add GgitBinaryType enum
libgit2-glib/ggit-types.c | 3 +++
libgit2-glib/ggit-types.h | 16 ++++++++++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/libgit2-glib/ggit-types.c b/libgit2-glib/ggit-types.c
index 7de2fef..74c6c61 100644
--- a/libgit2-glib/ggit-types.c
+++ b/libgit2-glib/ggit-types.c
@@ -26,6 +26,9 @@
/* Must cast the enums to ints to avoid enum compare warning */
#define ASSERT_ENUM(a, b) G_STATIC_ASSERT (((int) a) == ((int) b))
+ASSERT_ENUM (GGIT_DIFF_BINARY_NONE, GIT_DIFF_BINARY_NONE);
+ASSERT_ENUM (GGIT_DIFF_BINARY_LITERAL, GIT_DIFF_BINARY_LITERAL);
+ASSERT_ENUM (GGIT_DIFF_BINARY_DELTA, GIT_DIFF_BINARY_DELTA);
ASSERT_ENUM (GGIT_BRANCH_LOCAL, GIT_BRANCH_LOCAL);
ASSERT_ENUM (GGIT_BRANCH_REMOTE, GIT_BRANCH_REMOTE);
diff --git a/libgit2-glib/ggit-types.h b/libgit2-glib/ggit-types.h
index 8a317b3..74362d3 100644
--- a/libgit2-glib/ggit-types.h
+++ b/libgit2-glib/ggit-types.h
@@ -480,6 +480,22 @@ typedef enum
GGIT_FEATURE_SSH = (1 << 2)
} GgitFeatureFlags;
+/**
+ * GgitDiffBinaryType:
+ * @GIT_DIFF_BINARY_NONE: There is no binary delta.
+ * @GIT_DIFF_BINARY_LITERAL: The binary data is the literal contents of the file.
+ * @GIT_DIFF_BINARY_DELTA: The binary data is the delta from one side to the other.
+ *
+ * When producing a binary diff, the binary data returned will be
+ * either the deflated full ("literal") contents of the file, or
+ * the deflated binary delta between the two sides (whichever is
+ * smaller).
+ */
+typedef enum {
+ GGIT_DIFF_BINARY_NONE,
+ GGIT_DIFF_BINARY_LITERAL,
+ GGIT_DIFF_BINARY_DELTA
+} GgitDiffBinaryType;
/**
* GgitBlameFlags:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]