Skip to content

Commit

Permalink
fix: make git_status diff works with staged files (#2421)
Browse files Browse the repository at this point in the history
(cherry picked from commit eba418c)
  • Loading branch information
zoriya authored and Conni2461 committed Apr 9, 2023
1 parent 0326d46 commit 5c06f24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/telescope/previewers/buffer_previewer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ previewers.git_file_diff = defaulter(function(opts)
winid = self.state.winid,
})
else
putils.job_maker({ "git", "--no-pager", "diff", entry.value }, self.state.bufnr, {
putils.job_maker({ "git", "--no-pager", "diff", "HEAD", "--", entry.value }, self.state.bufnr, {
value = entry.value,
bufname = self.state.bufname,
cwd = opts.cwd,
Expand Down

0 comments on commit 5c06f24

Please sign in to comment.