mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-16 07:13:52 -05:00
Don't throw exception on :Gedit :bogus
This commit is contained in:
@@ -1721,9 +1721,9 @@ function! fugitive#BufReadCmd(...) abort
|
||||
else
|
||||
let [b:fugitive_type, exec_error] = s:ChompError([dir, 'cat-file', '-t', rev])
|
||||
if exec_error && rev =~# '^:0'
|
||||
let sha = s:TreeChomp(dir, 'write-tree', '--prefix=' . rev[3:-1])
|
||||
let exec_error = 0
|
||||
let b:fugitive_type = 'tree'
|
||||
let sha = s:ChompDefault('', dir, 'write-tree', '--prefix=' . rev[3:-1])
|
||||
let exec_error = empty(sha)
|
||||
let b:fugitive_type = exec_error ? '' : 'tree'
|
||||
endif
|
||||
if exec_error
|
||||
let error = b:fugitive_type
|
||||
|
||||
Reference in New Issue
Block a user