diff --git a/builtin/worktree.c b/builtin/worktree.c index 77ecd0f71f4247..82a93b0adfa650 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@ -473,7 +473,7 @@ static int add_worktree(const char *path, const char *refname, struct ref_store *wt_refs; struct repo_config_values *cfg = repo_config_values(the_repository); - worktrees = get_worktrees(the_repository); + worktrees = get_worktrees_without_reading_head(the_repository); check_candidate_path(path, opts->force, worktrees, "add"); free_worktrees(worktrees); worktrees = NULL;