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
55f2abb8
Commit
55f2abb8
authored
Jun 18, 2021
by
Dmitry Lobanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: upstream merge test has been added.
parent
94571908
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
tests/refs/branches/upstream.c
+23
-0
No files found.
tests/refs/branches/upstream.c
View file @
55f2abb8
...
@@ -71,6 +71,29 @@ void test_refs_branches_upstream__upstream_remote(void)
...
@@ -71,6 +71,29 @@ void test_refs_branches_upstream__upstream_remote(void)
git_buf_dispose
(
&
buf
);
git_buf_dispose
(
&
buf
);
}
}
void
test_refs_branches_upstream__upstream_merge
(
void
)
{
git_reference
*
branch
;
git_repository
*
repository
;
git_buf
buf
=
GIT_BUF_INIT
;
repository
=
cl_git_sandbox_init
(
"testrepo.git"
);
/* check repository */
cl_git_pass
(
git_reference_lookup
(
&
branch
,
repository
,
"refs/heads/test"
));
cl_git_pass
(
git_branch_set_upstream
(
branch
,
"test/master"
));
assert_config_entry_value
(
repository
,
"branch.test.remote"
,
"test"
);
assert_config_entry_value
(
repository
,
"branch.test.merge"
,
"refs/heads/master"
);
git_reference_free
(
branch
);
/* check merge branch */
cl_git_pass
(
git_branch_upstream_merge
(
&
buf
,
repository
,
"refs/heads/test"
));
cl_assert_equal_s
(
"refs/heads/master"
,
buf
.
ptr
);
git_buf_dispose
(
&
buf
);
}
void
test_refs_branches_upstream__upstream_remote_empty_value
(
void
)
void
test_refs_branches_upstream__upstream_remote_empty_value
(
void
)
{
{
git_repository
*
repository
;
git_repository
*
repository
;
...
...
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