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 `==`.
This commit is contained in:
Yufan You 2024-04-20 20:47:57 +08:00 committed by Lewis Russell
parent 7e38f07cab
commit 035da036e6

View File

@ -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