@@ -116,51 +116,6 @@ void test_refs_branches_create__creating_a_branch_with_an_invalid_name_returns_E
116116 git_branch_create (& branch , repo , "inv@{id" , target , 0 ));
117117}
118118
119- void test_refs_branches_create__default_reflog_message (void )
120- {
121- git_reflog * log ;
122- git_buf buf = GIT_BUF_INIT ;
123- const git_reflog_entry * entry ;
124- git_annotated_commit * annotated ;
125- git_signature * sig ;
126- git_config * cfg ;
127-
128- cl_git_pass (git_repository_config (& cfg , repo ));
129- cl_git_pass (git_config_set_string (cfg , "user.name" , "Foo Bar" ));
130- cl_git_pass (git_config_set_string (cfg , "user.email" , "foo@example.com" ));
131- git_config_free (cfg );
132-
133- cl_git_pass (git_signature_default (& sig , repo ));
134-
135- retrieve_known_commit (& target , repo );
136- cl_git_pass (git_branch_create (& branch , repo , NEW_BRANCH_NAME , target , false));
137- cl_git_pass (git_reflog_read (& log , repo , "refs/heads/" NEW_BRANCH_NAME ));
138-
139- entry = git_reflog_entry_byindex (log , 0 );
140- cl_git_pass (git_buf_printf (& buf , "branch: Created from %s" , git_oid_tostr_s (git_commit_id (target ))));
141- cl_assert_equal_s (git_buf_cstr (& buf ), git_reflog_entry_message (entry ));
142- cl_assert_equal_s (sig -> email , git_reflog_entry_committer (entry )-> email );
143-
144- cl_git_pass (git_reference_remove (repo , "refs/heads/" NEW_BRANCH_NAME ));
145- git_reference_free (branch );
146- git_reflog_free (log );
147- git_buf_clear (& buf );
148-
149- cl_git_pass (git_annotated_commit_from_revspec (& annotated , repo , "e90810b8df3" ));
150- cl_git_pass (git_branch_create_from_annotated (& branch , repo , NEW_BRANCH_NAME , annotated , true));
151- cl_git_pass (git_reflog_read (& log , repo , "refs/heads/" NEW_BRANCH_NAME ));
152-
153- entry = git_reflog_entry_byindex (log , 0 );
154- cl_git_pass (git_buf_printf (& buf , "branch: Created from e90810b8df3" ));
155- cl_assert_equal_s (git_buf_cstr (& buf ), git_reflog_entry_message (entry ));
156- cl_assert_equal_s (sig -> email , git_reflog_entry_committer (entry )-> email );
157-
158- git_annotated_commit_free (annotated );
159- git_buf_free (& buf );
160- git_reflog_free (log );
161- git_signature_free (sig );
162- }
163-
164119static void assert_branch_matches_name (
165120 const char * expected , const char * lookup_as )
166121{
0 commit comments