Skip to content

Commit 5b261c1

Browse files
P4Cuclason
authored andcommitted
fix(git_status): Fix worktree not found when use_file_path=true
1 parent 2ad199a commit 5b261c1

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

lua/telescope/builtin/__git.lua

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

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

469465
local set_opts_cwd = function(opts)

0 commit comments

Comments
 (0)