From 0ee0498b888ad8ec4df43cb7c8c48ce7112afe26 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 16 Jul 2019 14:47:20 -0400 Subject: [PATCH] Filter out warning on :Gedit master@{2.years.ago} --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 7fd8f01..4c20fcf 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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