Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
f29dde68
Commit
f29dde68
authored
Mar 12, 2015
by
Jacques Germishuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed git_merge_options 'flags' to 'tree_flags'
parent
0f24cac2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
12 deletions
+12
-12
include/git2/merge.h
+2
-2
src/merge.c
+2
-2
tests/cherrypick/workdir.c
+2
-2
tests/merge/trees/treediff.c
+1
-1
tests/merge/workdir/renames.c
+3
-3
tests/revert/workdir.c
+2
-2
No files found.
include/git2/merge.h
View file @
f29dde68
...
@@ -63,7 +63,7 @@ GIT_EXTERN(int) git_merge_file_init_input(
...
@@ -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
* 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
{
typedef
enum
{
/**
/**
...
@@ -225,7 +225,7 @@ typedef struct {
...
@@ -225,7 +225,7 @@ typedef struct {
*/
*/
typedef
struct
{
typedef
struct
{
unsigned
int
version
;
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
* Similarity to consider a file renamed (default 50). If
...
...
src/merge.c
View file @
f29dde68
...
@@ -1154,7 +1154,7 @@ int git_merge_diff_list__find_renames(
...
@@ -1154,7 +1154,7 @@ int git_merge_diff_list__find_renames(
assert
(
diff_list
&&
opts
);
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
;
return
0
;
similarity_ours
=
git__calloc
(
diff_list
->
conflicts
.
length
,
similarity_ours
=
git__calloc
(
diff_list
->
conflicts
.
length
,
...
@@ -1593,7 +1593,7 @@ static int merge_normalize_opts(
...
@@ -1593,7 +1593,7 @@ static int merge_normalize_opts(
git_merge_options
init
=
GIT_MERGE_OPTIONS_INIT
;
git_merge_options
init
=
GIT_MERGE_OPTIONS_INIT
;
memcpy
(
opts
,
&
init
,
sizeof
(
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
;
opts
->
rename_threshold
=
GIT_MERGE_TREE_RENAME_THRESHOLD
;
}
}
...
...
tests/cherrypick/workdir.c
View file @
f29dde68
...
@@ -300,7 +300,7 @@ void test_cherrypick_workdir__rename(void)
...
@@ -300,7 +300,7 @@ void test_cherrypick_workdir__rename(void)
{
0100644
,
"28d9eb4208074ad1cc84e71ccc908b34573f05d2"
,
0
,
"file3.txt.renamed"
},
{
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
;
opts
.
merge_opts
.
rename_threshold
=
50
;
git_oid_fromstr
(
&
head_oid
,
"cfc4f0999a8367568e049af4f72e452d40828a15"
);
git_oid_fromstr
(
&
head_oid
,
"cfc4f0999a8367568e049af4f72e452d40828a15"
);
...
@@ -335,7 +335,7 @@ void test_cherrypick_workdir__both_renamed(void)
...
@@ -335,7 +335,7 @@ void test_cherrypick_workdir__both_renamed(void)
{
0100644
,
"28d9eb4208074ad1cc84e71ccc908b34573f05d2"
,
2
,
"file3.txt.renamed_on_branch"
},
{
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
;
opts
.
merge_opts
.
rename_threshold
=
50
;
git_oid_fromstr
(
&
head_oid
,
"44cd2ed2052c9c68f9a439d208e9614dc2a55c70"
);
git_oid_fromstr
(
&
head_oid
,
"44cd2ed2052c9c68f9a439d208e9614dc2a55c70"
);
...
...
tests/merge/trees/treediff.c
View file @
f29dde68
...
@@ -45,7 +45,7 @@ static void test_find_differences(
...
@@ -45,7 +45,7 @@ static void test_find_differences(
git_tree
*
ancestor_tree
,
*
ours_tree
,
*
theirs_tree
;
git_tree
*
ancestor_tree
,
*
ours_tree
,
*
theirs_tree
;
git_merge_options
opts
=
GIT_MERGE_OPTIONS_INIT
;
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
.
target_limit
=
1000
;
opts
.
rename_threshold
=
50
;
opts
.
rename_threshold
=
50
;
...
...
tests/merge/workdir/renames.c
View file @
f29dde68
...
@@ -63,7 +63,7 @@ void test_merge_workdir_renames__renames(void)
...
@@ -63,7 +63,7 @@ void test_merge_workdir_renames__renames(void)
{
0100644
,
"b69fe837e4cecfd4c9a40cdca7c138468687df07"
,
0
,
"7-both-renamed.txt~rename_conflict_theirs"
},
{
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
;
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
));
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)
...
@@ -99,7 +99,7 @@ void test_merge_workdir_renames__ours(void)
{
0100644
,
"b42712cfe99a1a500b2a51fe984e0b8a7702ba11"
,
0
,
"7-both-renamed.txt"
},
{
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
;
merge_opts
.
rename_threshold
=
50
;
checkout_opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE
|
GIT_CHECKOUT_USE_OURS
;
checkout_opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE
|
GIT_CHECKOUT_USE_OURS
;
...
@@ -147,7 +147,7 @@ void test_merge_workdir_renames__similar(void)
...
@@ -147,7 +147,7 @@ void test_merge_workdir_renames__similar(void)
{
0100644
,
"b69fe837e4cecfd4c9a40cdca7c138468687df07"
,
0
,
"7-both-renamed.txt~rename_conflict_theirs"
},
{
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
;
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
));
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
View file @
f29dde68
...
@@ -408,7 +408,7 @@ void test_revert_workdir__rename_1_of_2(void)
...
@@ -408,7 +408,7 @@ void test_revert_workdir__rename_1_of_2(void)
{
0100644
,
"0f5bfcf58c558d865da6be0281d7795993646cee"
,
2
,
"file6.txt"
},
{
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
;
opts
.
merge_opts
.
rename_threshold
=
50
;
git_oid_fromstr
(
&
head_oid
,
"cef56612d71a6af8d8015691e4865f7fece905b5"
);
git_oid_fromstr
(
&
head_oid
,
"cef56612d71a6af8d8015691e4865f7fece905b5"
);
...
@@ -442,7 +442,7 @@ void test_revert_workdir__rename(void)
...
@@ -442,7 +442,7 @@ void test_revert_workdir__rename(void)
{
"file4.txt"
,
"file5.txt"
,
""
},
{
"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
;
opts
.
merge_opts
.
rename_threshold
=
50
;
git_oid_fromstr
(
&
head_oid
,
"55568c8de5322ff9a95d72747a239cdb64a19965"
);
git_oid_fromstr
(
&
head_oid
,
"55568c8de5322ff9a95d72747a239cdb64a19965"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment