perf(#3171): cache toplevel for untracked
This commit is contained in:
parent
000ca6bcdd
commit
0759a63ccf
@ -193,9 +193,10 @@ function M.get_toplevel(path)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- attempt to fetch toplevel
|
-- attempt to fetch toplevel, cache if untracked
|
||||||
local toplevel, git_dir = git_utils.get_toplevel(path)
|
local toplevel, git_dir = git_utils.get_toplevel(path)
|
||||||
if not toplevel or not git_dir then
|
if not toplevel or not git_dir then
|
||||||
|
M._toplevels_by_path[path] = false
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
local toplevel_norm = vim.fn.fnamemodify(toplevel, ":p")
|
local toplevel_norm = vim.fn.fnamemodify(toplevel, ":p")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user