mirror of https://github.com/folke/lazy.nvim.git
fix(git): automatically restore doc/tags when modified
This commit is contained in:
parent
43e9165994
commit
736529d097
|
@ -168,6 +168,12 @@ M.status = {
|
||||||
if ok then
|
if ok then
|
||||||
local lines = vim.split(output, "\n")
|
local lines = vim.split(output, "\n")
|
||||||
lines = vim.tbl_filter(function(line)
|
lines = vim.tbl_filter(function(line)
|
||||||
|
-- Fix doc/tags being marked as modified
|
||||||
|
if line:gsub("[\\/]", "/") == "doc/tags" then
|
||||||
|
local Process = require("lazy.manage.process")
|
||||||
|
Process.exec({ "git", "checkout", "--", "doc/tags" }, { cwd = self.plugin.dir })
|
||||||
|
return false
|
||||||
|
end
|
||||||
return line ~= ""
|
return line ~= ""
|
||||||
end, lines)
|
end, lines)
|
||||||
if #lines > 0 then
|
if #lines > 0 then
|
||||||
|
|
Loading…
Reference in New Issue