Skip to content

Commit

Permalink
fix(blame): put ignore-revs-file in correct position
Browse files Browse the repository at this point in the history
Fixes #975
  • Loading branch information
lewis6991 committed Apr 5, 2024
1 parent fa052c2 commit 5f267aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/gitsigns/git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -590,15 +590,15 @@ function Obj:run_blame(lines, lnum, opts)
vim.list_extend(args, opts.extra_opts)
end

args[#args + 1] = opts.rev
args[#args + 1] = '--'
args[#args + 1] = self.file

local ignore_file = self.repo.toplevel .. '/.git-blame-ignore-revs'
if uv.fs_stat(ignore_file) then
vim.list_extend(args, { '--ignore-revs-file', ignore_file })
end

args[#args + 1] = opts.rev
args[#args + 1] = '--'
args[#args + 1] = self.file

local results, stderr = self:command(args, { stdin = lines, ignore_error = true })
if stderr then
error_once('Error running git-blame: ' .. stderr)
Expand Down

0 comments on commit 5f267aa

Please sign in to comment.