Don't blow up on :Gdiff HEAD

This commit is contained in:
Tim Pope 2009-10-14 15:53:41 -04:00
parent a5e10c932d
commit 7a281a925c

View File

@ -558,7 +558,7 @@ function! s:Diff(...) abort
let file = s:buffer().expand(a:1)
endif
if file !~ ':' && file !~ '^/'
let file = file.s:buffer.path(':')
let file = file.s:buffer().path(':')
endif
else
let file = s:buffer().path(s:buffer().commit() == '' ? ':' : '/')