From 035da036e68e509ed158414416c827d022d914bd Mon Sep 17 00:00:00 2001 From: Yufan You Date: Sat, 20 Apr 2024 20:47:57 +0800 Subject: [PATCH] fix(yadm): correct ls-files check `not` has higher precedence than `~=`, so it was actually `(not #git_command(..)) ~= 0`. To fix it, we can simplify the double negation as just a `==`. --- lua/gitsigns/git.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/gitsigns/git.lua b/lua/gitsigns/git.lua index 664d4f941..e360594f1 100644 --- a/lua/gitsigns/git.lua +++ b/lua/gitsigns/git.lua @@ -340,7 +340,7 @@ function Repo:try_yadm(dir, gitdir, toplevel) return end - if not #git_command({ 'ls-files', dir }, { command = 'yadm' }) ~= 0 then + if #git_command({ 'ls-files', dir }, { command = 'yadm' }) == 0 then return end