Skip to content

Commit

Permalink
fix(yadm): correct ls-files check
Browse files Browse the repository at this point in the history
`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 `==`.
  • Loading branch information
ouuan authored and lewis6991 committed Apr 20, 2024
1 parent 7e38f07 commit 035da03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/gitsigns/git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 035da03

Please sign in to comment.