CVS: handle case where diff is valid but empty (#294)

CVS diff return code is 1 when the file differs from HEAD revision or
when there is an error (e.g. file is not under revision control),
while it is 0 (with an empty output) when the file is up-to-date.
The latter case was not handled, causing vim-signify to not recognize a
file under CVS when it did not have any change.
This commit is contained in:
Paolo Cretaro 2019-04-05 11:11:49 +02:00 committed by Marco Hinz
parent b7a1f91282
commit f34fea0eff

View File

@ -191,6 +191,8 @@ function! sy#repo#get_diff_cvs(sy, exitval, diff) abort
break
endif
endfor
elseif a:exitval == 0 && len(a:diff) == 0
let found_diff = 1
endif
call s:get_diff_end(a:sy, found_diff, 'cvs', diff)
endfunction