From 736529d097979b3585cbc8e2728543fde9b314ed Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 10 Oct 2023 11:41:49 +0200 Subject: [PATCH] fix(git): automatically restore doc/tags when modified --- lua/lazy/manage/task/git.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/lazy/manage/task/git.lua b/lua/lazy/manage/task/git.lua index e18968b1..1c70b385 100644 --- a/lua/lazy/manage/task/git.lua +++ b/lua/lazy/manage/task/git.lua @@ -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