| 581 | } |
| 582 | |
| 583 | void strbuf_worktree_ref(const struct worktree *wt, |
| 584 | struct strbuf *sb, |
| 585 | const char *refname) |
| 586 | { |
| 587 | if (parse_worktree_ref(refname, NULL, NULL, NULL) == |
| 588 | REF_WORKTREE_CURRENT && |
| 589 | wt && !wt->is_current) { |
| 590 | if (is_main_worktree(wt)) |
| 591 | strbuf_addstr(sb, "main-worktree/"); |
| 592 | else |
| 593 | strbuf_addf(sb, "worktrees/%s/", wt->id); |
| 594 | } |
| 595 | strbuf_addstr(sb, refname); |
| 596 | } |
| 597 | |
| 598 | int other_head_refs(refs_for_each_cb fn, void *cb_data) |
| 599 | { |
no test coverage detected