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

Function continue_single_pick

sequencer.c:5232–5257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5230}
5231
5232static 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
5259static int commit_staged_changes(struct repository *r,
5260 struct replay_opts *opts,

Callers 1

sequencer_continueFunction · 0.85

Calls 6

refs_ref_existsFunction · 0.85
get_main_ref_storeFunction · 0.85
errorFunction · 0.85
strvec_pushFunction · 0.85
strvec_pushlFunction · 0.85
run_commandFunction · 0.85

Tested by

no test coverage detected