| 57 | } |
| 58 | |
| 59 | static int is_current_worktree(struct worktree *wt) |
| 60 | { |
| 61 | char *git_dir = absolute_pathdup(repo_get_git_dir(wt->repo)); |
| 62 | char *wt_git_dir = get_worktree_git_dir(wt); |
| 63 | int is_current = !fspathcmp(git_dir, absolute_path(wt_git_dir)); |
| 64 | free(wt_git_dir); |
| 65 | free(git_dir); |
| 66 | return is_current; |
| 67 | } |
| 68 | |
| 69 | struct worktree *get_current_worktree(struct repository *repo) |
| 70 | { |
no test coverage detected