diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-09-01 00:49:48 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-01 00:49:48 +0200 |
commit | e699684cf6bdfd4d6fd9086a6935168f86a0177e (patch) | |
tree | 1cea1c4b68f829b39d6bf281aac992a7e1e227f7 /wt-status.c | |
parent | Merge branch 'jk/index-pack-w-more-threads' (diff) | |
parent | sequencer: treat REVERT_HEAD as a pseudo ref (diff) | |
download | git-e699684cf6bdfd4d6fd9086a6935168f86a0177e.tar.xz git-e699684cf6bdfd4d6fd9086a6935168f86a0177e.zip |
Merge branch 'hn/refs-pseudorefs'
Accesses to two pseudorefs have been updated to properly use ref
API.
* hn/refs-pseudorefs:
sequencer: treat REVERT_HEAD as a pseudo ref
builtin/commit: suggest update-ref for pseudoref removal
sequencer: treat CHERRY_PICK_HEAD as a pseudo ref
refs: make refs_ref_exists public
Diffstat (limited to 'wt-status.c')
-rw-r--r-- | wt-status.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wt-status.c b/wt-status.c index 7ce58b8aae..bb0f9120de 100644 --- a/wt-status.c +++ b/wt-status.c @@ -1668,13 +1668,13 @@ 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); } wt_status_check_bisect(NULL, state); - if (!stat(git_path_revert_head(r), &st) && + if (refs_ref_exists(get_main_ref_store(r), "REVERT_HEAD") && !get_oid("REVERT_HEAD", &oid)) { state->revert_in_progress = 1; oidcpy(&state->revert_head_oid, &oid); |