MCPcopy Index your code
hub / github.com/git/git / init_basic_state

Function init_basic_state

builtin/rebase.c:271–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271static int init_basic_state(struct replay_opts *opts, const char *head_name,
272 struct commit *onto,
273 const struct object_id *orig_head)
274{
275 FILE *interactive;
276
277 if (!is_directory(merge_dir()) &&
278 safe_create_dir_in_gitdir(the_repository, merge_dir()))
279 return error_errno(_("could not create temporary %s"), merge_dir());
280
281 refs_delete_reflog(get_main_ref_store(the_repository), "REBASE_HEAD");
282
283 interactive = fopen(path_interactive(), "w");
284 if (!interactive)
285 return error_errno(_("could not mark as interactive"));
286 fclose(interactive);
287
288 return write_basic_state(opts, head_name, onto, orig_head);
289}
290
291static int do_interactive_rebase(struct rebase_options *opts, unsigned flags)
292{

Callers 1

do_interactive_rebaseFunction · 0.85

Calls 6

is_directoryFunction · 0.85
error_errnoFunction · 0.85
refs_delete_reflogFunction · 0.85
get_main_ref_storeFunction · 0.85
write_basic_stateFunction · 0.85

Tested by

no test coverage detected