| 269 | } |
| 270 | |
| 271 | static 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 | |
| 291 | static int do_interactive_rebase(struct rebase_options *opts, unsigned flags) |
| 292 | { |
no test coverage detected