From c8e4159efd226218d827b5da71fc8f95f8172412 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 21 Aug 2020 16:59:35 +0000 Subject: sequencer: treat CHERRY_PICK_HEAD as a pseudo ref Check for existence and delete CHERRY_PICK_HEAD through ref functions. This will help cherry-pick work with alternate ref storage backends. Signed-off-by: Han-Wen Nienhuys Signed-off-by: Junio C Hamano --- wt-status.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wt-status.c') diff --git a/wt-status.c b/wt-status.c index d75399085d..c6abf2f3ca 100644 --- a/wt-status.c +++ b/wt-status.c @@ -1672,8 +1672,8 @@ void wt_status_get_state(struct repository *r, state->merge_in_progress = 1; } else if (wt_status_check_rebase(NULL, state)) { ; /* all set */ - } else if (!stat(git_path_cherry_pick_head(r), &st) && - !get_oid("CHERRY_PICK_HEAD", &oid)) { + } else if (refs_ref_exists(get_main_ref_store(r), "CHERRY_PICK_HEAD") && + !get_oid("CHERRY_PICK_HEAD", &oid)) { state->cherry_pick_in_progress = 1; oidcpy(&state->cherry_pick_head_oid, &oid); } -- cgit v1.2.3