| 3488 | } |
| 3489 | |
| 3490 | static 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 | |
| 3504 | static int skip_single_pick(void) |
| 3505 | { |
no test coverage detected