| 5230 | } |
| 5231 | |
| 5232 | static int continue_single_pick(struct repository *r, struct replay_opts *opts) |
| 5233 | { |
| 5234 | struct child_process cmd = CHILD_PROCESS_INIT; |
| 5235 | |
| 5236 | if (!refs_ref_exists(get_main_ref_store(r), "CHERRY_PICK_HEAD") && |
| 5237 | !refs_ref_exists(get_main_ref_store(r), "REVERT_HEAD")) |
| 5238 | return error(_("no cherry-pick or revert in progress")); |
| 5239 | |
| 5240 | cmd.git_cmd = 1; |
| 5241 | strvec_push(&cmd.args, "commit"); |
| 5242 | |
| 5243 | /* |
| 5244 | * continue_single_pick() handles the case of recovering from a |
| 5245 | * conflict. should_edit() doesn't handle that case; for a conflict, |
| 5246 | * we want to edit if the user asked for it, or if they didn't specify |
| 5247 | * and stdin is a tty. |
| 5248 | */ |
| 5249 | if (!opts->edit || (opts->edit < 0 && !isatty(0))) |
| 5250 | /* |
| 5251 | * Include --cleanup=strip as well because we don't want the |
| 5252 | * "# Conflicts:" messages. |
| 5253 | */ |
| 5254 | strvec_pushl(&cmd.args, "--no-edit", "--cleanup=strip", NULL); |
| 5255 | |
| 5256 | return run_command(&cmd); |
| 5257 | } |
| 5258 | |
| 5259 | static int commit_staged_changes(struct repository *r, |
| 5260 | struct replay_opts *opts, |
no test coverage detected