Do not print 'D'-message when there was no update (#66)

This commit assumes that the git pull command prints 'Already
up-to-date' when the repository is up-to-date. Let's just hope that it
doesn't change in the future.
This commit is contained in:
Junegunn Choi 2014-09-04 14:10:33 +09:00
parent 3f82808bea
commit 99f6f36b69

View file

@ -558,7 +558,8 @@ function! s:finish(pull)
if !empty(s:prev_update.errors)
call add(msgs, "Press 'R' to retry.")
endif
if a:pull
if a:pull && !empty(filter(getline(5, '$'),
\ "v:val =~ '^- ' && stridx(v:val, 'Already up-to-date') < 0"))
call add(msgs, "Press 'D' to see the updated changes.")
endif
echo join(msgs, ' ')