Renamed git_merge_options 'flags' to 'tree_flags'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
diff --git a/include/git2/merge.h b/include/git2/merge.h
index 73375b3..387197a 100644
--- a/include/git2/merge.h
+++ b/include/git2/merge.h
@@ -63,7 +63,7 @@ GIT_EXTERN(int) git_merge_file_init_input(
/**
* Flags for `git_merge_tree` options. A combination of these flags can be
- * passed in via the `flags` value in the `git_merge_options`.
+ * passed in via the `tree_flags` value in the `git_merge_options`.
*/
typedef enum {
/**
@@ -225,7 +225,7 @@ typedef struct {
*/
typedef struct {
unsigned int version;
- git_merge_tree_flag_t flags;
+ git_merge_tree_flag_t tree_flags;
/**
* Similarity to consider a file renamed (default 50). If
diff --git a/src/merge.c b/src/merge.c
index 2972d9f..12e85ff 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -1154,7 +1154,7 @@ int git_merge_diff_list__find_renames(
assert(diff_list && opts);
- if ((opts->flags & GIT_MERGE_TREE_FIND_RENAMES) == 0)
+ if ((opts->tree_flags & GIT_MERGE_TREE_FIND_RENAMES) == 0)
return 0;
similarity_ours = git__calloc(diff_list->conflicts.length,
@@ -1593,7 +1593,7 @@ static int merge_normalize_opts(
git_merge_options init = GIT_MERGE_OPTIONS_INIT;
memcpy(opts, &init, sizeof(init));
- opts->flags = GIT_MERGE_TREE_FIND_RENAMES;
+ opts->tree_flags = GIT_MERGE_TREE_FIND_RENAMES;
opts->rename_threshold = GIT_MERGE_TREE_RENAME_THRESHOLD;
}
diff --git a/tests/cherrypick/workdir.c b/tests/cherrypick/workdir.c
index f8b4ca2..787f1f4 100644
--- a/tests/cherrypick/workdir.c
+++ b/tests/cherrypick/workdir.c
@@ -300,7 +300,7 @@ void test_cherrypick_workdir__rename(void)
{ 0100644, "28d9eb4208074ad1cc84e71ccc908b34573f05d2", 0, "file3.txt.renamed" },
};
- opts.merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
+ opts.merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
opts.merge_opts.rename_threshold = 50;
git_oid_fromstr(&head_oid, "cfc4f0999a8367568e049af4f72e452d40828a15");
@@ -335,7 +335,7 @@ void test_cherrypick_workdir__both_renamed(void)
{ 0100644, "28d9eb4208074ad1cc84e71ccc908b34573f05d2", 2, "file3.txt.renamed_on_branch" },
};
- opts.merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
+ opts.merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
opts.merge_opts.rename_threshold = 50;
git_oid_fromstr(&head_oid, "44cd2ed2052c9c68f9a439d208e9614dc2a55c70");
diff --git a/tests/merge/trees/treediff.c b/tests/merge/trees/treediff.c
index 8b47f7d..eea651d 100644
--- a/tests/merge/trees/treediff.c
+++ b/tests/merge/trees/treediff.c
@@ -45,7 +45,7 @@ static void test_find_differences(
git_tree *ancestor_tree, *ours_tree, *theirs_tree;
git_merge_options opts = GIT_MERGE_OPTIONS_INIT;
- opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
+ opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
opts.target_limit = 1000;
opts.rename_threshold = 50;
diff --git a/tests/merge/workdir/renames.c b/tests/merge/workdir/renames.c
index 807a88f..83006a7 100644
--- a/tests/merge/workdir/renames.c
+++ b/tests/merge/workdir/renames.c
@@ -63,7 +63,7 @@ void test_merge_workdir_renames__renames(void)
{ 0100644, "b69fe837e4cecfd4c9a40cdca7c138468687df07", 0, "7-both-renamed.txt~rename_conflict_theirs" },
};
- merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
+ merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
merge_opts.rename_threshold = 50;
cl_git_pass(merge_branches(repo, GIT_REFS_HEADS_DIR BRANCH_RENAME_OURS, GIT_REFS_HEADS_DIR BRANCH_RENAME_THEIRS, &merge_opts, NULL));
@@ -99,7 +99,7 @@ void test_merge_workdir_renames__ours(void)
{ 0100644, "b42712cfe99a1a500b2a51fe984e0b8a7702ba11", 0, "7-both-renamed.txt" },
};
- merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
+ merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
merge_opts.rename_threshold = 50;
checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE | GIT_CHECKOUT_USE_OURS;
@@ -147,7 +147,7 @@ void test_merge_workdir_renames__similar(void)
{ 0100644, "b69fe837e4cecfd4c9a40cdca7c138468687df07", 0, "7-both-renamed.txt~rename_conflict_theirs" },
};
- merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
+ merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
merge_opts.rename_threshold = 50;
cl_git_pass(merge_branches(repo, GIT_REFS_HEADS_DIR BRANCH_RENAME_OURS, GIT_REFS_HEADS_DIR BRANCH_RENAME_THEIRS, &merge_opts, NULL));
diff --git a/tests/revert/workdir.c b/tests/revert/workdir.c
index 171cacb..7ccf0f9 100644
--- a/tests/revert/workdir.c
+++ b/tests/revert/workdir.c
@@ -408,7 +408,7 @@ void test_revert_workdir__rename_1_of_2(void)
{ 0100644, "0f5bfcf58c558d865da6be0281d7795993646cee", 2, "file6.txt" },
};
- opts.merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
+ opts.merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
opts.merge_opts.rename_threshold = 50;
git_oid_fromstr(&head_oid, "cef56612d71a6af8d8015691e4865f7fece905b5");
@@ -442,7 +442,7 @@ void test_revert_workdir__rename(void)
{ "file4.txt", "file5.txt", "" },
};
- opts.merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
+ opts.merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
opts.merge_opts.rename_threshold = 50;
git_oid_fromstr(&head_oid, "55568c8de5322ff9a95d72747a239cdb64a19965");