aboutsummaryrefslogtreecommitdiffstats
path: root/wt-status.c
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2020-08-21 16:59:35 +0000
committerJunio C Hamano <gitster@pobox.com>2020-08-21 11:20:10 -0700
commitc8e4159efd226218d827b5da71fc8f95f8172412 (patch)
tree7db9b2330fd75041ed1559724ba9669b8511951f /wt-status.c
parent3f9f1acccf32fb1feda0f7ea8533bed2b594b1a0 (diff)
downloadgit-c8e4159efd226218d827b5da71fc8f95f8172412.tar.gz
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 <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c4
1 files changed, 2 insertions, 2 deletions
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);
}