feat(git): submodule recursion on by default

This commit is contained in:
2026-05-19 09:53:48 +02:00
parent 5f956401c1
commit 50db85ea5f
2 changed files with 10 additions and 18 deletions
+2 -2
View File
@@ -249,7 +249,7 @@ function Repo.new(gitdir, worktree)
util.debounce(Repo._fetch_status, 50)
self:start_watcher()
self:refresh()
if vim.g.git_submodule_recursion then
if vim.g.git_submodule_recursion ~= false then
self:_start_modules_watcher()
for _, name in ipairs(find_submodules(gitdir)) do
self:_register_submodule(name)
@@ -382,7 +382,7 @@ function Repo:_handle_fs_event(relpath)
return
end
self:_invalidate(relpath)
if relpath == "modules" and vim.g.git_submodule_recursion then
if relpath == "modules" and vim.g.git_submodule_recursion ~= false then
if vim.uv.fs_stat(vim.fs.joinpath(self.gitdir, "modules")) then
self:_start_modules_watcher()
for _, name in ipairs(find_submodules(self.gitdir)) do