We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7323c81 commit ff6e796Copy full SHA for ff6e796
lua/nvim-tree/git/utils.lua
@@ -14,7 +14,7 @@ function M.get_toplevel(cwd)
14
log.raw("git", toplevel)
15
log.profile_end(ps, "git toplevel %s", cwd)
16
17
- if not toplevel or #toplevel == 0 or toplevel:match "fatal" then
+ if vim.v.shell_error ~= 0 or not toplevel or #toplevel == 0 or toplevel:match "fatal" then
18
return nil
19
end
20
@@ -23,6 +23,9 @@ function M.get_toplevel(cwd)
23
-- msys2 git support
24
if has_cygpath then
25
toplevel = vim.fn.system("cygpath -w " .. vim.fn.shellescape(toplevel))
26
+ if vim.v.shell_error ~= 0 then
27
+ return nil
28
+ end
29
30
toplevel = toplevel:gsub("/", "\\")
31
0 commit comments