From f34fea0eff09d0fb4ec54aec3c07345e6c4486d9 Mon Sep 17 00:00:00 2001 From: Paolo Cretaro Date: Fri, 5 Apr 2019 11:11:49 +0200 Subject: [PATCH] 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. --- autoload/sy/repo.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index 88328c3..64bf07a 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -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