[libgit2-glib] merge: fix api break



commit b230b493780fbc686c4cdbd840d16569b577e120
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Mar 14 23:50:34 2016 +0100

    merge: fix api break

 libgit2-glib/ggit-merge-options.c |   22 +++++++++++-----------
 libgit2-glib/ggit-merge-options.h |    6 +++---
 libgit2-glib/ggit-types.h         |   21 +++++++++++++++++----
 3 files changed, 31 insertions(+), 18 deletions(-)
---
diff --git a/libgit2-glib/ggit-merge-options.c b/libgit2-glib/ggit-merge-options.c
index 5d6ece4..65fca05 100644
--- a/libgit2-glib/ggit-merge-options.c
+++ b/libgit2-glib/ggit-merge-options.c
@@ -110,33 +110,33 @@ ggit_merge_options_new ()
 /**
  * ggit_merge_options_set_tree_flags:
  * @merge_options: a #GgitMergeOptions.
- * @tree_flags: the tree flags.
+ * @flags: the flags.
  *
- * Set the tree flags to use for merging.
+ * Set the flags to use for merging.
  *
  **/
 void
-ggit_merge_options_set_tree_flags (GgitMergeOptions   *merge_options,
-                                   GgitMergeTreeFlags  tree_flags)
+ggit_merge_options_set_flags (GgitMergeOptions   *merge_options,
+                              GgitMergeFlags      flags)
 {
        g_return_if_fail (merge_options != NULL);
-       merge_options->merge_options.tree_flags = (git_merge_tree_flag_t)tree_flags;
+       merge_options->merge_options.flags = (git_merge_flag_t)flags;
 }
 
 /**
- * ggit_merge_options_get_tree_flags:
+ * ggit_merge_options_get_flags:
  * @merge_options: a #GgitMergeOptions.
  *
  * Get the tree flags to use for merging.
  *
- * Returns: the tree flags.
+ * Returns: the flags.
  *
  **/
-GgitMergeTreeFlags
-ggit_merge_options_get_tree_flags (GgitMergeOptions *merge_options)
+GgitMergeFlags
+ggit_merge_options_get_flags (GgitMergeOptions *merge_options)
 {
        g_return_val_if_fail (merge_options != NULL, 0);
-       return (GgitMergeTreeFlags)merge_options->merge_options.tree_flags;
+       return (GgitMergeFlags)merge_options->merge_options.flags;
 }
 
 /**
@@ -297,7 +297,7 @@ ggit_merge_options_set_file_flags (GgitMergeOptions   *merge_options,
                                    GgitMergeFileFlags  file_flags)
 {
        g_return_if_fail (merge_options != NULL);
-       merge_options->merge_options.file_flags = (git_merge_file_flags_t)file_flags;
+       merge_options->merge_options.file_flags = (git_merge_file_flag_t)file_flags;
 }
 
 /**
diff --git a/libgit2-glib/ggit-merge-options.h b/libgit2-glib/ggit-merge-options.h
index e8a3a92..ea5d380 100644
--- a/libgit2-glib/ggit-merge-options.h
+++ b/libgit2-glib/ggit-merge-options.h
@@ -42,10 +42,10 @@ void                   ggit_merge_options_free                    (GgitMergeOpti
 
 GgitMergeOptions      *ggit_merge_options_new                     (void);
 
-void                   ggit_merge_options_set_tree_flags          (GgitMergeOptions         *merge_options,
-                                                                   GgitMergeTreeFlags        tree_flags);
+void                   ggit_merge_options_set_flags               (GgitMergeOptions         *merge_options,
+                                                                   GgitMergeFlags            flags);
 
-GgitMergeTreeFlags     ggit_merge_options_get_tree_flags          (GgitMergeOptions         *merge_options);
+GgitMergeFlags         ggit_merge_options_get_flags               (GgitMergeOptions         *merge_options);
 
 void                   ggit_merge_options_set_rename_threshold    (GgitMergeOptions         *merge_options,
                                                                    guint                     
rename_threshold);
diff --git a/libgit2-glib/ggit-types.h b/libgit2-glib/ggit-types.h
index b2a43e8..1fc0e21 100644
--- a/libgit2-glib/ggit-types.h
+++ b/libgit2-glib/ggit-types.h
@@ -600,12 +600,25 @@ typedef enum {
 } GgitMergeFileFlags;
 
 /**
- * GgitMergeTreeFlags:
- * @GGIT_MERGE_TREE_FIND_RENAMES: detect renames.
+ * GgitMergeFlags:
+ * @GGIT_MERGE_FIND_RENAMES: detect renames that occur between the common
+ * ancestor and the "ours" side or the common ancestor and the "theirs" side.
+ * This will enable the ability to merge between a modified and renamed file.
+ * @GGIT_MERGE_FAIL_ON_CONFLICT: If a conflict occurs, exit immediately instead
+ * of attempting to continue resolving conflicts.  The merge operation will
+ * fail with @GGIT_EMERGECONFLICT and no index will be returned.
+ * @GGIT_MERGE_SKIP_REUC: do not write the REUC extension on the generated index.
+ * @GGIT_MERGE_NO_RECURSIVE: If the commits being merged have multiple merge bases,
+ * do not build a recursive merge base (by merging the multiple merge bases),
+ * instead simply use the first base.  This flag provides a similar
+ * merge base to `git-merge-resolve`.
  */
 typedef enum {
-       GGIT_MERGE_TREE_FIND_RENAMES = (1 << 0)
-} GgitMergeTreeFlags;
+       GGIT_MERGE_FIND_RENAMES     = (1 << 0),
+       GGIT_MERGE_FAIL_ON_CONFLICT = (1 << 1),
+       GGIT_MERGE_SKIP_REUC        = (1 << 2),
+       GGIT_MERGE_NO_RECURSIVE     = (1 << 3)
+} GgitMergeFlags;
 
 /**
  * GgitRebaseOperationType:


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