Skip to content

Commit 29d9d52

Browse files
committed
fix(git_status): Fix worktree not found when use_file_path=true
1 parent 78857db commit 29d9d52

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lua/telescope/builtin/__git.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,11 +458,7 @@ local try_worktrees = function(opts)
458458
end
459459

460460
local current_path_toplevel = function()
461-
local gitdir = vim.fn.finddir(".git", vim.fn.expand "%:p" .. ";")
462-
if gitdir == "" then
463-
return nil
464-
end
465-
return Path:new(gitdir):parent():absolute()
461+
return vim.fs.root(0, ".git")
466462
end
467463

468464
local set_opts_cwd = function(opts)

0 commit comments

Comments
 (0)