Filter out warning on :Gedit master@{2.years.ago}

This commit is contained in:
Tim Pope 2019-07-16 14:47:20 -04:00
parent 469a73f3d9
commit 0ee0498b88

View File

@ -897,7 +897,7 @@ function! fugitive#Find(object, ...) abort
endif
endif
if commit !~# '^[0-9a-f]\{40,\}$'
let commit = s:ChompDefault('', [dir, 'rev-parse', '--verify', commit, '--'])
let commit = matchstr(s:ChompDefault('', [dir, 'rev-parse', '--verify', commit, '--']), '\<[0-9a-f]\{40,\}\>')
endif
if len(commit)
let f = 'fugitive://' . dir . '//' . commit . file