Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lua/nvim-tree/git/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,10 @@ function M.get_toplevel(path)
end
end

-- attempt to fetch toplevel
-- attempt to fetch toplevel, cache if untracked
local toplevel, git_dir = git_utils.get_toplevel(path)
if not toplevel or not git_dir then
M._toplevels_by_path[path] = false
return nil
end
local toplevel_norm = vim.fn.fnamemodify(toplevel, ":p")
Expand Down
Loading