diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 2b05056..9bd089c 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4633,6 +4633,8 @@ function! fugitive#Diffsplit(autodir, keepfocus, mods, arg, args) abort elseif arg =~# '^:\d$' exe s:DirCheck() let file = s:Relative(arg . ':') + elseif arg =~# '^[~^]\d*$' + return 'echoerr ' . string('fugitive: change ' . arg . ' to !' . arg . ' to diff against ancestor') else try let file = arg =~# '^:/.' ? fugitive#RevParse(arg) . s:Relative(':') : s:Expand(arg)