mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-15 06:43: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$'
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user