File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,29 @@ void test_refs_branches_upstream__upstream_remote(void)
7171 git_buf_dispose (& buf );
7272}
7373
74+ void test_refs_branches_upstream__upstream_merge (void )
75+ {
76+ git_reference * branch ;
77+ git_repository * repository ;
78+ git_buf buf = GIT_BUF_INIT ;
79+
80+ repository = cl_git_sandbox_init ("testrepo.git" );
81+
82+ /* check repository */
83+ cl_git_pass (git_reference_lookup (& branch , repository , "refs/heads/test" ));
84+ cl_git_pass (git_branch_set_upstream (branch , "test/master" ));
85+
86+ assert_config_entry_value (repository , "branch.test.remote" , "test" );
87+ assert_config_entry_value (repository , "branch.test.merge" , "refs/heads/master" );
88+
89+ git_reference_free (branch );
90+
91+ /* check merge branch */
92+ cl_git_pass (git_branch_upstream_merge (& buf , repository , "refs/heads/test" ));
93+ cl_assert_equal_s ("refs/heads/master" , buf .ptr );
94+ git_buf_dispose (& buf );
95+ }
96+
7497void test_refs_branches_upstream__upstream_remote_empty_value (void )
7598{
7699 git_repository * repository ;
You can’t perform that action at this time.
0 commit comments