Skip to content

Commit 259efee

Browse files
committed
fix(#1540): watcher ignore directories with name exactly '.git'
1 parent e3353c4 commit 259efee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/nvim-tree/explorer/watch.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ local function update_parent_statuses(node, project, root)
1919
end
2020

2121
local function is_git(path)
22-
return path:match "%.git$" ~= nil or path:match(utils.path_add_trailing ".git") ~= nil
22+
return vim.fn.fnamemodify(path, ":t") == ".git"
2323
end
2424

2525
local IGNORED_PATHS = {

0 commit comments

Comments
 (0)