mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-15 14:53:51 -05:00
Provide explanatory error on :Gdiff ~
References https://github.com/tpope/vim-fugitive/issues/1402
This commit is contained in:
@@ -4633,6 +4633,8 @@ function! fugitive#Diffsplit(autodir, keepfocus, mods, arg, args) abort
|
|||||||
elseif arg =~# '^:\d$'
|
elseif arg =~# '^:\d$'
|
||||||
exe s:DirCheck()
|
exe s:DirCheck()
|
||||||
let file = s:Relative(arg . ':')
|
let file = s:Relative(arg . ':')
|
||||||
|
elseif arg =~# '^[~^]\d*$'
|
||||||
|
return 'echoerr ' . string('fugitive: change ' . arg . ' to !' . arg . ' to diff against ancestor')
|
||||||
else
|
else
|
||||||
try
|
try
|
||||||
let file = arg =~# '^:/.' ? fugitive#RevParse(arg) . s:Relative(':') : s:Expand(arg)
|
let file = arg =~# '^:/.' ? fugitive#RevParse(arg) . s:Relative(':') : s:Expand(arg)
|
||||||
|
|||||||
Reference in New Issue
Block a user