fix git root for v1 (monkeypatch)

This commit is contained in:
kiyan 2020-11-22 16:33:01 +01:00 committed by Kiyan
parent ef893b523d
commit d3eb9cc4c6

View File

@ -64,6 +64,10 @@ function M.update_status(entries, cwd)
return return
end end
if not git_root then
return
end
local matching_cwd = utils.path_to_matching_str(git_root..'/') local matching_cwd = utils.path_to_matching_str(git_root..'/')
for _, node in pairs(entries) do for _, node in pairs(entries) do
local relpath = node.absolute_path:gsub(matching_cwd, '') local relpath = node.absolute_path:gsub(matching_cwd, '')