Skip to content

Commit f29dde6

Browse files
committed
Renamed git_merge_options 'flags' to 'tree_flags'
1 parent 0f24cac commit f29dde6

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

include/git2/merge.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ GIT_EXTERN(int) git_merge_file_init_input(
6363

6464
/**
6565
* Flags for `git_merge_tree` options. A combination of these flags can be
66-
* passed in via the `flags` value in the `git_merge_options`.
66+
* passed in via the `tree_flags` value in the `git_merge_options`.
6767
*/
6868
typedef enum {
6969
/**
@@ -225,7 +225,7 @@ typedef struct {
225225
*/
226226
typedef struct {
227227
unsigned int version;
228-
git_merge_tree_flag_t flags;
228+
git_merge_tree_flag_t tree_flags;
229229

230230
/**
231231
* Similarity to consider a file renamed (default 50). If

src/merge.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ int git_merge_diff_list__find_renames(
11541154

11551155
assert(diff_list && opts);
11561156

1157-
if ((opts->flags & GIT_MERGE_TREE_FIND_RENAMES) == 0)
1157+
if ((opts->tree_flags & GIT_MERGE_TREE_FIND_RENAMES) == 0)
11581158
return 0;
11591159

11601160
similarity_ours = git__calloc(diff_list->conflicts.length,
@@ -1593,7 +1593,7 @@ static int merge_normalize_opts(
15931593
git_merge_options init = GIT_MERGE_OPTIONS_INIT;
15941594
memcpy(opts, &init, sizeof(init));
15951595

1596-
opts->flags = GIT_MERGE_TREE_FIND_RENAMES;
1596+
opts->tree_flags = GIT_MERGE_TREE_FIND_RENAMES;
15971597
opts->rename_threshold = GIT_MERGE_TREE_RENAME_THRESHOLD;
15981598
}
15991599

tests/cherrypick/workdir.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void test_cherrypick_workdir__rename(void)
300300
{ 0100644, "28d9eb4208074ad1cc84e71ccc908b34573f05d2", 0, "file3.txt.renamed" },
301301
};
302302

303-
opts.merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
303+
opts.merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
304304
opts.merge_opts.rename_threshold = 50;
305305

306306
git_oid_fromstr(&head_oid, "cfc4f0999a8367568e049af4f72e452d40828a15");
@@ -335,7 +335,7 @@ void test_cherrypick_workdir__both_renamed(void)
335335
{ 0100644, "28d9eb4208074ad1cc84e71ccc908b34573f05d2", 2, "file3.txt.renamed_on_branch" },
336336
};
337337

338-
opts.merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
338+
opts.merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
339339
opts.merge_opts.rename_threshold = 50;
340340

341341
git_oid_fromstr(&head_oid, "44cd2ed2052c9c68f9a439d208e9614dc2a55c70");

tests/merge/trees/treediff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static void test_find_differences(
4545
git_tree *ancestor_tree, *ours_tree, *theirs_tree;
4646

4747
git_merge_options opts = GIT_MERGE_OPTIONS_INIT;
48-
opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
48+
opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
4949
opts.target_limit = 1000;
5050
opts.rename_threshold = 50;
5151

tests/merge/workdir/renames.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void test_merge_workdir_renames__renames(void)
6363
{ 0100644, "b69fe837e4cecfd4c9a40cdca7c138468687df07", 0, "7-both-renamed.txt~rename_conflict_theirs" },
6464
};
6565

66-
merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
66+
merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
6767
merge_opts.rename_threshold = 50;
6868

6969
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)
9999
{ 0100644, "b42712cfe99a1a500b2a51fe984e0b8a7702ba11", 0, "7-both-renamed.txt" },
100100
};
101101

102-
merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
102+
merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
103103
merge_opts.rename_threshold = 50;
104104
checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE | GIT_CHECKOUT_USE_OURS;
105105

@@ -147,7 +147,7 @@ void test_merge_workdir_renames__similar(void)
147147
{ 0100644, "b69fe837e4cecfd4c9a40cdca7c138468687df07", 0, "7-both-renamed.txt~rename_conflict_theirs" },
148148
};
149149

150-
merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
150+
merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
151151
merge_opts.rename_threshold = 50;
152152

153153
cl_git_pass(merge_branches(repo, GIT_REFS_HEADS_DIR BRANCH_RENAME_OURS, GIT_REFS_HEADS_DIR BRANCH_RENAME_THEIRS, &merge_opts, NULL));

tests/revert/workdir.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ void test_revert_workdir__rename_1_of_2(void)
408408
{ 0100644, "0f5bfcf58c558d865da6be0281d7795993646cee", 2, "file6.txt" },
409409
};
410410

411-
opts.merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
411+
opts.merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
412412
opts.merge_opts.rename_threshold = 50;
413413

414414
git_oid_fromstr(&head_oid, "cef56612d71a6af8d8015691e4865f7fece905b5");
@@ -442,7 +442,7 @@ void test_revert_workdir__rename(void)
442442
{ "file4.txt", "file5.txt", "" },
443443
};
444444

445-
opts.merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
445+
opts.merge_opts.tree_flags |= GIT_MERGE_TREE_FIND_RENAMES;
446446
opts.merge_opts.rename_threshold = 50;
447447

448448
git_oid_fromstr(&head_oid, "55568c8de5322ff9a95d72747a239cdb64a19965");

0 commit comments

Comments
 (0)