Skip to content

Commit b209aaa

Browse files
committed
fix: ignore all "fatal" git errors in check-ignore, part of #226
1 parent 9929ed0 commit b209aaa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lua/neo-tree/git/ignored.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ local load_ignored_per_directory_internal = function(path, pattern)
1515
local result = vim.fn.systemlist(cmd)
1616
if vim.v.shell_error == 128 then
1717
if type(result) == "table" then
18-
if result[1] == "fatal: this operation must be run in a work tree" then
19-
return {}
20-
end
21-
if vim.startswith(result[1], "fatal: not a git repository") then
18+
if vim.startswith(result[1], "fatal:") then
19+
-- These errors are all about not being in a repository
2220
return {}
2321
end
2422
end

0 commit comments

Comments
 (0)