fix git parsing and init
- run `ls ROOT_PATH` on init to make sure we are in the right place - match git path with `.*` to make sure we check when in a subdir > it could cause issues though, fix this later with a better > git interface
This commit is contained in:
@@ -35,7 +35,8 @@ end
|
||||
local function create_git_checker(pattern)
|
||||
return function(relpath)
|
||||
for _, status in pairs(GIT_STATUS) do
|
||||
local ret = string.match(status, '^.. ' .. relpath)
|
||||
-- TODO: fix .* as it could be problematic
|
||||
local ret = string.match(status, '^.. .*' .. relpath)
|
||||
if ret ~= nil and string.match(ret, pattern) ~= nil then return true end
|
||||
end
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user