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
cdb6c1c8
Commit
cdb6c1c8
authored
Oct 26, 2015
by
Edward Thomson
Committed by
Edward Thomson
Nov 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge: add a second-level recursive merge
parent
75dee59c
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
60 additions
and
2 deletions
+60
-2
tests/merge/trees/recursive.c
+48
-2
tests/resources/merge-recursive/.gitted/objects/0f/a6ead2731b9d138afe38c336c9727ea05027a7
+2
-0
tests/resources/merge-recursive/.gitted/objects/41/71bb8d40e9fc830d79b757dc06ec6c14548b78
+0
-0
tests/resources/merge-recursive/.gitted/objects/4e/70a6b06fc62481f80fbb74327849e7170eebff
+0
-0
tests/resources/merge-recursive/.gitted/objects/68/a2e1ee61a23a4728fe6b35580fbbbf729df370
+0
-0
tests/resources/merge-recursive/.gitted/objects/75/c653822173a8e5795153ec3773dfe44bb9bb63
+2
-0
tests/resources/merge-recursive/.gitted/objects/81/5b5a1c80ca749d705c7aa0cb294a00cbedd340
+6
-0
tests/resources/merge-recursive/.gitted/objects/89/8d12687fb35be271c27c795a6b32c8b51da79e
+0
-0
tests/resources/merge-recursive/.gitted/objects/ad/2ace9e15f66b3d1138922e6ffdc3ea3f967fa6
+0
-0
tests/resources/merge-recursive/.gitted/objects/c0/bd078a61d2cc22c52ca5ce04abdcdc5cc1829e
+0
-0
tests/resources/merge-recursive/.gitted/refs/heads/branchC-1
+1
-0
tests/resources/merge-recursive/.gitted/refs/heads/branchC-2
+1
-0
No files found.
tests/merge/trees/recursive.c
View file @
cdb6c1c8
...
@@ -88,8 +88,6 @@ void test_merge_trees_recursive__two_norecursive(void)
...
@@ -88,8 +88,6 @@ void test_merge_trees_recursive__two_norecursive(void)
git_index
*
index
;
git_index
*
index
;
git_merge_options
opts
=
GIT_MERGE_OPTIONS_INIT
;
git_merge_options
opts
=
GIT_MERGE_OPTIONS_INIT
;
opts
.
flags
|=
GIT_MERGE_NO_RECURSIVE
;
struct
merge_index_entry
merge_index_entries
[]
=
{
struct
merge_index_entry
merge_index_entries
[]
=
{
{
0100644
,
"ffb36e513f5fdf8a6ba850a20142676a2ac4807d"
,
0
,
"asparagus.txt"
},
{
0100644
,
"ffb36e513f5fdf8a6ba850a20142676a2ac4807d"
,
0
,
"asparagus.txt"
},
{
0100644
,
"68f6182f4c85d39e1309d97c7e456156dc9c0096"
,
0
,
"beef.txt"
},
{
0100644
,
"68f6182f4c85d39e1309d97c7e456156dc9c0096"
,
0
,
"beef.txt"
},
...
@@ -101,6 +99,8 @@ void test_merge_trees_recursive__two_norecursive(void)
...
@@ -101,6 +99,8 @@ void test_merge_trees_recursive__two_norecursive(void)
{
0100644
,
"4e21d2d63357bde5027d1625f5ec6b430cdeb143"
,
3
,
"veal.txt"
},
{
0100644
,
"4e21d2d63357bde5027d1625f5ec6b430cdeb143"
,
3
,
"veal.txt"
},
};
};
opts
.
flags
|=
GIT_MERGE_NO_RECURSIVE
;
cl_git_pass
(
merge_commits_from_branches
(
&
index
,
repo
,
"branchB-1"
,
"branchB-2"
,
&
opts
));
cl_git_pass
(
merge_commits_from_branches
(
&
index
,
repo
,
"branchB-1"
,
"branchB-2"
,
&
opts
));
cl_assert
(
merge_test_index
(
index
,
merge_index_entries
,
8
));
cl_assert
(
merge_test_index
(
index
,
merge_index_entries
,
8
));
...
@@ -108,3 +108,49 @@ void test_merge_trees_recursive__two_norecursive(void)
...
@@ -108,3 +108,49 @@ void test_merge_trees_recursive__two_norecursive(void)
git_index_free
(
index
);
git_index_free
(
index
);
}
}
void
test_merge_trees_recursive__three
(
void
)
{
git_index
*
index
;
git_merge_options
opts
=
GIT_MERGE_OPTIONS_INIT
;
struct
merge_index_entry
merge_index_entries
[]
=
{
{
0100644
,
"ffb36e513f5fdf8a6ba850a20142676a2ac4807d"
,
0
,
"asparagus.txt"
},
{
0100644
,
"68f6182f4c85d39e1309d97c7e456156dc9c0096"
,
0
,
"beef.txt"
},
{
0100644
,
"4b7c5650008b2e747fe1809eeb5a1dde0e80850a"
,
0
,
"bouilli.txt"
},
{
0100644
,
"c4e6cca3ec6ae0148ed231f97257df8c311e015f"
,
0
,
"gravy.txt"
},
{
0100644
,
"68af1fc7407fd9addf1701a87eb1c95c7494c598"
,
0
,
"oyster.txt"
},
{
0100644
,
"15faa0c9991f2d65686e844651faa2ff9827887b"
,
0
,
"veal.txt"
},
};
cl_git_pass
(
merge_commits_from_branches
(
&
index
,
repo
,
"branchC-1"
,
"branchC-2"
,
&
opts
));
cl_assert
(
merge_test_index
(
index
,
merge_index_entries
,
6
));
git_index_free
(
index
);
}
void
test_merge_trees_recursive__three_norecursive
(
void
)
{
git_index
*
index
;
git_merge_options
opts
=
GIT_MERGE_OPTIONS_INIT
;
struct
merge_index_entry
merge_index_entries
[]
=
{
{
0100644
,
"ffb36e513f5fdf8a6ba850a20142676a2ac4807d"
,
0
,
"asparagus.txt"
},
{
0100644
,
"68f6182f4c85d39e1309d97c7e456156dc9c0096"
,
0
,
"beef.txt"
},
{
0100644
,
"4b7c5650008b2e747fe1809eeb5a1dde0e80850a"
,
0
,
"bouilli.txt"
},
{
0100644
,
"c4e6cca3ec6ae0148ed231f97257df8c311e015f"
,
0
,
"gravy.txt"
},
{
0100644
,
"68af1fc7407fd9addf1701a87eb1c95c7494c598"
,
0
,
"oyster.txt"
},
{
0100644
,
"b2a81ead9e722af0099fccfb478cea88eea749a2"
,
1
,
"veal.txt"
},
{
0100644
,
"898d12687fb35be271c27c795a6b32c8b51da79e"
,
2
,
"veal.txt"
},
{
0100644
,
"68a2e1ee61a23a4728fe6b35580fbbbf729df370"
,
3
,
"veal.txt"
},
};
opts
.
flags
|=
GIT_MERGE_NO_RECURSIVE
;
cl_git_pass
(
merge_commits_from_branches
(
&
index
,
repo
,
"branchC-1"
,
"branchC-2"
,
&
opts
));
cl_assert
(
merge_test_index
(
index
,
merge_index_entries
,
8
));
git_index_free
(
index
);
}
tests/resources/merge-recursive/.gitted/objects/0f/a6ead2731b9d138afe38c336c9727ea05027a7
0 → 100644
View file @
cdb6c1c8
File added
tests/resources/merge-recursive/.gitted/objects/41/71bb8d40e9fc830d79b757dc06ec6c14548b78
0 → 100644
View file @
cdb6c1c8
File added
tests/resources/merge-recursive/.gitted/objects/4e/70a6b06fc62481f80fbb74327849e7170eebff
0 → 100644
View file @
cdb6c1c8
File added
tests/resources/merge-recursive/.gitted/objects/68/a2e1ee61a23a4728fe6b35580fbbbf729df370
0 → 100644
View file @
cdb6c1c8
File added
tests/resources/merge-recursive/.gitted/objects/75/c653822173a8e5795153ec3773dfe44bb9bb63
0 → 100644
View file @
cdb6c1c8
File added
tests/resources/merge-recursive/.gitted/objects/81/5b5a1c80ca749d705c7aa0cb294a00cbedd340
0 → 100644
View file @
cdb6c1c8
File added
tests/resources/merge-recursive/.gitted/objects/89/8d12687fb35be271c27c795a6b32c8b51da79e
0 → 100644
View file @
cdb6c1c8
File added
tests/resources/merge-recursive/.gitted/objects/ad/2ace9e15f66b3d1138922e6ffdc3ea3f967fa6
0 → 100644
View file @
cdb6c1c8
File added
tests/resources/merge-recursive/.gitted/objects/c0/bd078a61d2cc22c52ca5ce04abdcdc5cc1829e
0 → 100644
View file @
cdb6c1c8
File added
tests/resources/merge-recursive/.gitted/refs/heads/branchC-1
0 → 100644
View file @
cdb6c1c8
ad2ace9e15f66b3d1138922e6ffdc3ea3f967fa6
tests/resources/merge-recursive/.gitted/refs/heads/branchC-2
0 → 100644
View file @
cdb6c1c8
815b5a1c80ca749d705c7aa0cb294a00cbedd340
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