Skip to content

Commit

Permalink
fix(git): automatically restore doc/tags when modified
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 10, 2023
1 parent 43e9165 commit 736529d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/lazy/manage/task/git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ M.status = {
if ok then
local lines = vim.split(output, "\n")
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 ~= ""
end, lines)
if #lines > 0 then
Expand Down

0 comments on commit 736529d

Please sign in to comment.