Commit f29dde68 by Jacques Germishuys

Renamed git_merge_options 'flags' to 'tree_flags'

parent 0f24cac2
......@@ -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
......
......@@ -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;
}
......
......@@ -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");
......
......@@ -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;
......
......@@ -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));
......
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment