summary refs log tree commit diff
path: root/wt-status.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-08-31 15:49:48 -0700
committerJunio C Hamano <gitster@pobox.com>2020-08-31 15:49:48 -0700
commite699684cf6bdfd4d6fd9086a6935168f86a0177e (patch)
tree1cea1c4b68f829b39d6bf281aac992a7e1e227f7 /wt-status.c
parent53015c9dd40e0a5afc14aeeb6e6def25f10fff4d (diff)
parentb8825ef233840136bd01a9619b36af515f498eb2 (diff)
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.c6
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);