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

Function rollback_single_pick

sequencer.c:3490–3502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3488}
3489
3490static int rollback_single_pick(struct repository *r)
3491{
3492 struct object_id head_oid;
3493
3494 if (!refs_ref_exists(get_main_ref_store(r), "CHERRY_PICK_HEAD") &&
3495 !refs_ref_exists(get_main_ref_store(r), "REVERT_HEAD"))
3496 return error(_("no cherry-pick or revert in progress"));
3497 if (refs_read_ref_full(get_main_ref_store(the_repository), "HEAD", 0, &head_oid, NULL))
3498 return error(_("cannot resolve HEAD"));
3499 if (is_null_oid(&head_oid))
3500 return error(_("cannot abort from a branch yet to be born"));
3501 return reset_merge(&head_oid);
3502}
3503
3504static int skip_single_pick(void)
3505{

Callers 1

sequencer_rollbackFunction · 0.85

Calls 6

refs_ref_existsFunction · 0.85
get_main_ref_storeFunction · 0.85
errorFunction · 0.85
refs_read_ref_fullFunction · 0.85
is_null_oidFunction · 0.85
reset_mergeFunction · 0.85

Tested by

no test coverage detected