Skip to content

Commit 159170c

Browse files
committed
fix(git): pass git-dir/wotk-tree to preview cmds
Closes #2536
1 parent 8d61b57 commit 159170c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/fzf-lua/providers/git.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ local function git_preview(opts, file)
7474
-- directory up the path that is a Git repo. git_diff() passes file
7575
-- paths relative to the Git repo root so to ensure the previewer
7676
-- can interpret the paths correctly, it must use the repo root as cwd.
77-
opts.cwd = path.git_root({ cwd = opts.cwd })
77+
opts.cwd = path.git_root(opts)
7878
opts.preview = path.git_cwd(opts.preview, opts)
7979
if type(opts.preview_pager) == "function" then
8080
opts.preview_pager = opts.preview_pager()

0 commit comments

Comments
 (0)