diff options
author | Han-Wen Nienhuys <hanwen@google.com> | 2020-08-21 18:59:35 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-21 20:20:10 +0200 |
commit | c8e4159efd226218d827b5da71fc8f95f8172412 (patch) | |
tree | 7db9b2330fd75041ed1559724ba9669b8511951f /wt-status.c | |
parent | refs: make refs_ref_exists public (diff) | |
download | git-c8e4159efd226218d827b5da71fc8f95f8172412.tar.xz git-c8e4159efd226218d827b5da71fc8f95f8172412.zip |
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.c | 4 |
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); } |