| 474 | } |
| 475 | |
| 476 | int is_worktree_being_bisected(const struct worktree *wt, |
| 477 | const char *target) |
| 478 | { |
| 479 | struct wt_status_state state; |
| 480 | int found_bisect; |
| 481 | |
| 482 | memset(&state, 0, sizeof(state)); |
| 483 | found_bisect = wt_status_check_bisect(wt, &state) && |
| 484 | state.bisecting_from && |
| 485 | skip_prefix(target, "refs/heads/", &target) && |
| 486 | !strcmp(state.bisecting_from, target); |
| 487 | wt_status_state_free_buffers(&state); |
| 488 | return found_bisect; |
| 489 | } |
| 490 | |
| 491 | /* |
| 492 | * note: this function should be able to detect shared symref even if |
no test coverage detected