From 3bf602b13d86b7aef57fec4a2df29467b61435cb Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 27 Dec 2019 17:19:30 -0500 Subject: [PATCH] Use underlying commit not tag for :Gedit tag:path --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 3c372f3..302d074 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -934,7 +934,7 @@ function! fugitive#Find(object, ...) abort let commit = matchstr(s:ChompDefault('', [dir, 'merge-base'] + commits + ['--']), '\<[0-9a-f]\{40,\}\>') endif if commit !~# '^[0-9a-f]\{40,\}$' - let commit = matchstr(s:ChompDefault('', [dir, 'rev-parse', '--verify', commit, '--']), '\<[0-9a-f]\{40,\}\>') + let commit = matchstr(s:ChompDefault('', [dir, 'rev-parse', '--verify', commit . (len(file) ? '^{}' : ''), '--']), '\<[0-9a-f]\{40,\}\>') endif if len(commit) let f = 'fugitive://' . dir . '//' . commit . file